diff graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessProvider.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 5404cde63c43
children 0e2cceed1caf
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessProvider.java	Tue Sep 17 17:09:43 2013 +0200
+++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/MetaAccessProvider.java	Tue Sep 17 10:31:22 2013 -0700
@@ -79,11 +79,11 @@
     boolean constantEquals(Constant x, Constant y);
 
     /**
-     * Returns the length of an array that is wrapped in a {@link Constant} object.
-     * 
-     * @throws IllegalArgumentException if {@code array} is not an array
+     * Returns the length of an array that is wrapped in a {@link Constant} object. If {@code array}
+     * is not an array, or the array length is not available at this point, the return value is
+     * {@code null}.
      */
-    int lookupArrayLength(Constant array);
+    Integer lookupArrayLength(Constant array);
 
     /**
      * Reads a value of this kind using a base address and a displacement.