summaryrefslogtreecommitdiff
path: root/runtime/art_method-inl.h
diff options
context:
space:
mode:
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