Make Array's throw routines void.
The "bool" return type of Array::ThrowArrayIndexOutOfBoundsException and
Array::ThrowArrayStoreException is useless. Make them void.
Note on ARM, this removes a "cmp" instruction in AGET/APUT instructions.
Change-Id: I843e895aa4622ca56aaa3f2eb2d5b5100a92c1ae
diff --git a/src/mirror/array.cc b/src/mirror/array.cc
index e2e63a6..88cd309 100644
--- a/src/mirror/array.cc
+++ b/src/mirror/array.cc
@@ -134,14 +134,12 @@
return new_array;
}
-bool Array::ThrowArrayIndexOutOfBoundsException(int32_t index) const {
+void Array::ThrowArrayIndexOutOfBoundsException(int32_t index) const {
art::ThrowArrayIndexOutOfBoundsException(index, GetLength());
- return false;
}
-bool Array::ThrowArrayStoreException(Object* object) const {
+void Array::ThrowArrayStoreException(Object* object) const {
art::ThrowArrayStoreException(object->GetClass(), this->GetClass());
- return false;
}
template<typename T>