summaryrefslogtreecommitdiff
path: root/runtime/mirror/object_array-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/object_array-inl.h')
-rw-r--r--runtime/mirror/object_array-inl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/mirror/object_array-inl.h b/runtime/mirror/object_array-inl.h
index bef4af617a..4a7e7b35da 100644
--- a/runtime/mirror/object_array-inl.h
+++ b/runtime/mirror/object_array-inl.h
@@ -129,7 +129,8 @@ inline void ObjectArray<T>::AssignableMemmove(int32_t dst_pos, ObjectArray<T>* s
}
}
// Perform the memmove using int memmove then perform the write barrier.
- CHECK_EQ(sizeof(HeapReference<T>), sizeof(uint32_t));
+ static_assert(sizeof(HeapReference<T>) == sizeof(uint32_t),
+ "art::mirror::HeapReference<T> and uint32_t have different sizes.");
IntArray* dstAsIntArray = reinterpret_cast<IntArray*>(this);
IntArray* srcAsIntArray = reinterpret_cast<IntArray*>(src);
if (kUseReadBarrier) {
@@ -172,7 +173,8 @@ inline void ObjectArray<T>::AssignableMemcpy(int32_t dst_pos, ObjectArray<T>* sr
}
}
// Perform the memmove using int memcpy then perform the write barrier.
- CHECK_EQ(sizeof(HeapReference<T>), sizeof(uint32_t));
+ static_assert(sizeof(HeapReference<T>) == sizeof(uint32_t),
+ "art::mirror::HeapReference<T> and uint32_t have different sizes.");
IntArray* dstAsIntArray = reinterpret_cast<IntArray*>(this);
IntArray* srcAsIntArray = reinterpret_cast<IntArray*>(src);
if (kUseReadBarrier) {