comparison 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
comparison
equal deleted inserted replaced
2940:bf15ed11c2bc 2941:cd4176d590e7
124 } 124 }
125 assert length != null; 125 assert length != null;
126 return length; 126 return length;
127 } 127 }
128 CiConstant constantValue = null; 128 CiConstant constantValue = null;
129 if (array instanceof LoadField) { 129 if (array.isConstant()) {
130 constantValue = ((LoadField) array).constantValue();
131 } else if (array.isConstant()) {
132 constantValue = array.asConstant(); 130 constantValue = array.asConstant();
133 } 131 }
134 if (constantValue != null && constantValue.isNonNull()) { 132 if (constantValue != null && constantValue.isNonNull()) {
135 Graph graph = node.graph(); 133 Graph graph = node.graph();
136 if (graph instanceof CompilerGraph) { 134 if (graph instanceof CompilerGraph) {