summaryrefslogtreecommitdiff
path: root/runtime/imt_conflict_table.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2018-10-11 10:44:58 +0100
committer Vladimir Marko <vmarko@google.com> 2018-10-12 17:53:50 +0100
commit78baed5ec51a6e2d113e8b29aafa5c6203b46845 (patch)
tree57ca544020f309e3529e33300ad4867ca4579c1e /runtime/imt_conflict_table.h
parenta48eb7e0690187618d2824a7d9b5601e7f5cdf80 (diff)
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
Diffstat (limited to 'runtime/imt_conflict_table.h')
-rw-r--r--runtime/imt_conflict_table.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/imt_conflict_table.h b/runtime/imt_conflict_table.h
index 35868642e1..02b3be48e8 100644
--- a/runtime/imt_conflict_table.h
+++ b/runtime/imt_conflict_table.h
@@ -187,17 +187,17 @@ class ImtConflictTable {
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);
}
}