Implement the "unreasonable array allocation" OutOfMemoryError.
This doesn't fix test 061 because we still need AllocWithGrowth, but at least
it gets us far enough to need that.
Change-Id: Ia7b4a1f91a31e25d439f36b17280ce21c9ed8933
diff --git a/src/runtime_support.cc b/src/runtime_support.cc
index 89dac70..039a749 100644
--- a/src/runtime_support.cc
+++ b/src/runtime_support.cc
@@ -352,7 +352,7 @@
}
// Helper function to alloc array for OP_FILLED_NEW_ARRAY
-extern "C" Array* artCheckAndArrayAllocFromCode(uint32_t type_idx, Method* method,
+extern "C" Array* artCheckAndAllocArrayFromCode(uint32_t type_idx, Method* method,
int32_t component_count) {
if (component_count < 0) {
Thread::Current()->ThrowNewExceptionF("Ljava/lang/NegativeArraySizeException;", "%d",
@@ -386,7 +386,7 @@
// Given the context of a calling Method, use its DexCache to resolve a type to an array Class. If
// it cannot be resolved, throw an error. If it can, use it to create an array.
-extern "C" Array* artArrayAllocFromCode(uint32_t type_idx, Method* method, int32_t component_count) {
+extern "C" Array* artAllocArrayFromCode(uint32_t type_idx, Method* method, int32_t component_count) {
if (component_count < 0) {
Thread::Current()->ThrowNewExceptionF("Ljava/lang/NegativeArraySizeException;", "%d",
component_count);