Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewArrayStub.java @ 15634:172484b8f800
don't deopt on large array allocations
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 13 May 2014 20:20:34 -0700 |
parents | 9f1995f6d9a3 |
children | af0e42dad358 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewArrayStub.java Tue May 13 20:20:29 2014 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/NewArrayStub.java Tue May 13 20:20:34 2014 -0700 @@ -97,7 +97,7 @@ // check that array length is small enough for fast path. Word thread = registerAsWord(threadRegister); - if (length <= MAX_ARRAY_FAST_PATH_ALLOCATION_LENGTH) { + if (length >= 0 && length <= MAX_ARRAY_FAST_PATH_ALLOCATION_LENGTH) { Word memory = refillAllocate(thread, intArrayHub, sizeInBytes, logging()); if (memory.notEqual(0)) { if (logging()) {