# HG changeset patch # User Gilles Duboscq # Date 1453902093 -3600 # Node ID 8c10585adbdcf735668f2abb62e46c80de375ecb # Parent f6b021195f0811495a1763d6259612d69db3d78f Fix NewArrayStub when inlineContiguousAllocationSupported is false diff -r f6b021195f08 -r 8c10585adbdc graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewArrayStub.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewArrayStub.java Tue Jan 26 15:31:38 2016 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewArrayStub.java Wed Jan 27 14:41:33 2016 +0100 @@ -24,6 +24,7 @@ import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.arrayPrototypeMarkWord; import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.getAndClearObjectResult; +import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.inlineContiguousAllocationSupported; import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.layoutHelperElementTypeMask; import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.layoutHelperElementTypeShift; import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.layoutHelperHeaderSizeMask; @@ -113,7 +114,7 @@ // check that array length is small enough for fast path. Word thread = registerAsWord(threadRegister); - if (length >= 0 && length <= MAX_ARRAY_FAST_PATH_ALLOCATION_LENGTH) { + if (inlineContiguousAllocationSupported() && length >= 0 && length <= MAX_ARRAY_FAST_PATH_ALLOCATION_LENGTH) { Word memory = refillAllocate(thread, intArrayHub, sizeInBytes, logging()); if (memory.notEqual(0)) { if (logging()) {