ART: Use reinterpret_cast{32,64}<> when appropriate.
And fix UnstartedRuntime checking for null arguments in all
functions where we now use reinterpret_cast32<>.
This is a follow-up to
https://android-review.googlesource.com/783607 .
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: Pixel 2 XL boots.
Test: m test-art-target-gtest
Test: testrunner.py --target --optimizing
Bug: 117427174
Change-Id: I58f8ad59f70e3fbb1d06aef419cd26555706fa65
diff --git a/runtime/imt_conflict_table.h b/runtime/imt_conflict_table.h
index 3586864..02b3be4 100644
--- a/runtime/imt_conflict_table.h
+++ b/runtime/imt_conflict_table.h
@@ -187,17 +187,17 @@
ArtMethod* GetMethod(size_t index, PointerSize pointer_size) const {
if (pointer_size == PointerSize::k64) {
- return reinterpret_cast<ArtMethod*>(static_cast<uintptr_t>(data64_[index]));
+ return reinterpret_cast64<ArtMethod*>(data64_[index]);
} else {
- return reinterpret_cast<ArtMethod*>(static_cast<uintptr_t>(data32_[index]));
+ return reinterpret_cast32<ArtMethod*>(data32_[index]);
}
}
void SetMethod(size_t index, PointerSize pointer_size, ArtMethod* method) {
if (pointer_size == PointerSize::k64) {
- data64_[index] = dchecked_integral_cast<uint64_t>(reinterpret_cast<uintptr_t>(method));
+ data64_[index] = reinterpret_cast64<uint64_t>(method);
} else {
- data32_[index] = dchecked_integral_cast<uint32_t>(reinterpret_cast<uintptr_t>(method));
+ data32_[index] = reinterpret_cast32<uint32_t>(method);
}
}