< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/NewArrayNode.java
Print this page
@@ -96,11 +96,11 @@
@Override
public void virtualize(VirtualizerTool tool) {
ValueNode lengthAlias = tool.getAlias(length());
if (lengthAlias.asConstant() != null) {
int constantLength = lengthAlias.asJavaConstant().asInt();
- if (constantLength >= 0 && constantLength < tool.getMaximumEntryCount()) {
+ if (constantLength >= 0 && constantLength <= tool.getMaximumEntryCount()) {
ValueNode[] state = new ValueNode[constantLength];
ConstantNode defaultForKind = constantLength == 0 ? null : defaultElementValue();
for (int i = 0; i < constantLength; i++) {
state[i] = defaultForKind;
}
< prev index next >