From af242824dcedbbe39c92b49d148e7ff50267e47f Mon Sep 17 00:00:00 2001 From: Sriram Raman Date: Tue, 19 Apr 2011 17:17:27 -0400 Subject: [PATCH] Revert "Fix a type error in the allocation of non-moving arrays." per Ryan's request This reverts commit bdd06aadab6214d2378b7d5078f92bfb14e7e3dc. Change-Id: Ifbb4bd7941fe4f2e9d02ca2b7d77186edae4dd55 --- vm/native/dalvik_system_VMRuntime.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vm/native/dalvik_system_VMRuntime.c b/vm/native/dalvik_system_VMRuntime.c index eb086a8a6..fec24be38 100644 --- a/vm/native/dalvik_system_VMRuntime.c +++ b/vm/native/dalvik_system_VMRuntime.c @@ -128,6 +128,7 @@ static void Dalvik_dalvik_system_VMRuntime_newNonMovableArray(const u4* args, { ClassObject* elementClass = (ClassObject*) args[1]; int length = args[2]; + ArrayObject* newArray; if (elementClass == NULL) { dvmThrowException("Ljava/lang/NullPointerException;", NULL); @@ -141,10 +142,7 @@ static void Dalvik_dalvik_system_VMRuntime_newNonMovableArray(const u4* args, // TODO: right now, we don't have a copying collector, so there's no need // to do anything special here, but we ought to pass the non-movability // through to the allocator. - ClassObject* arrayClass = dvmFindArrayClassForElement(elementClass); - ArrayObject* newArray = dvmAllocArrayByClass(arrayClass, - length, - ALLOC_DEFAULT); + newArray = dvmAllocObjectArray(elementClass, length, ALLOC_DEFAULT); if (newArray == NULL) { assert(dvmCheckException(dvmThreadSelf())); RETURN_VOID(); -- 2.11.0