Mercurial > hg > truffle
diff graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ArrayLength.java @ 2941:cd4176d590e7
Towards lowering phase.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Thu, 09 Jun 2011 17:28:56 +0200 |
parents | e7ba2bad98fb |
children | 4b63eb1197ca |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ArrayLength.java Thu Jun 09 14:56:14 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ArrayLength.java Thu Jun 09 17:28:56 2011 +0200 @@ -126,9 +126,7 @@ return length; } CiConstant constantValue = null; - if (array instanceof LoadField) { - constantValue = ((LoadField) array).constantValue(); - } else if (array.isConstant()) { + if (array.isConstant()) { constantValue = array.asConstant(); } if (constantValue != null && constantValue.isNonNull()) {