summaryrefslogtreecommitdiff
path: root/runtime/art_method-inl.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2020-12-29 20:41:43 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2021-01-12 09:39:41 +0000
commitc0d392be9172c4c60b3e81b0123489ec3036c401 (patch)
tree13b77bab3a3a8a1acf26dc02d2ee09bcd3a51c36 /runtime/art_method-inl.h
parentc38d94449a0ccfefd396d2e01b571f3e804d9e48 (diff)
Improve invokeinterface for nterp.
- Remove bitwise negation of imt_index: the class linker already always initializes the imt_index. - Special case the imt index of default methods: to simplify invocation in nterp, mask the method_index to create the imt index. - Add arm64, arm, x64 support in nterp. Test: test.py Bug: 112676029 Change-Id: I815a4a4ec5c219921ab4ed1a20b02586aab19a46
Diffstat (limited to 'runtime/art_method-inl.h')
-rw-r--r--runtime/art_method-inl.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index 291438284f..b2a27f36d2 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -423,10 +423,8 @@ inline uint16_t ArtMethod::GetCounter() {
}
inline uint32_t ArtMethod::GetImtIndex() {
- if (LIKELY(IsAbstract() && imt_index_ != 0)) {
- uint16_t imt_index = ~imt_index_;
- DCHECK_EQ(imt_index, ImTable::GetImtIndex(this)) << PrettyMethod();
- return imt_index;
+ if (LIKELY(IsAbstract())) {
+ return imt_index_;
} else {
return ImTable::GetImtIndex(this);
}
@@ -434,7 +432,7 @@ inline uint32_t ArtMethod::GetImtIndex() {
inline void ArtMethod::CalculateAndSetImtIndex() {
DCHECK(IsAbstract()) << PrettyMethod();
- imt_index_ = ~ImTable::GetImtIndex(this);
+ imt_index_ = ImTable::GetImtIndex(this);
}
} // namespace art