Mercurial > hg > truffle
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java @ 11682:976ebd1973d1
The runtime might not always be able to report an array length
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Tue, 17 Sep 2013 10:31:22 -0700 |
parents | f091e0d6f4f3 |
children | 226ef8ab5bc0 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Tue Sep 17 17:09:43 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Tue Sep 17 10:31:22 2013 -0700 @@ -476,9 +476,9 @@ } @Override - public int lookupArrayLength(Constant array) { + public Integer lookupArrayLength(Constant array) { if (array.getKind() != Kind.Object || array.isNull() || !array.asObject().getClass().isArray()) { - throw new IllegalArgumentException(array + " is not an array"); + return null; } return Array.getLength(array.asObject()); }