< prev index next >
src/jdk/nashorn/internal/codegen/SpillObjectCreator.java
Print this page
*** 107,118 ****
}
//avoid blowing up the array if we can
if (constantValue instanceof Integer) {
arrayData = arrayData.set(index, ((Integer)constantValue).intValue(), false);
- } else if (constantValue instanceof Long) {
- arrayData = arrayData.set(index, ((Long)constantValue).longValue(), false);
} else if (constantValue instanceof Double) {
arrayData = arrayData.set(index, ((Double)constantValue).doubleValue(), false);
} else {
arrayData = arrayData.set(index, constantValue, false);
}
--- 107,116 ----
*** 167,182 ****
if (property == null) {
final int index = ArrayIndex.getArrayIndex(tuple.key);
assert ArrayIndex.isValidArrayIndex(index);
method.dup();
! method.load(ArrayIndex.toLongIndex(index));
! loadTuple(method, tuple);
method.dynamicSetIndex(callSiteFlags);
} else {
method.dup();
! loadTuple(method, tuple);
method.dynamicSet(property.getKey(), codegen.getCallSiteFlags(), false);
}
}
}
--- 165,180 ----
if (property == null) {
final int index = ArrayIndex.getArrayIndex(tuple.key);
assert ArrayIndex.isValidArrayIndex(index);
method.dup();
! loadIndex(method, ArrayIndex.toLongIndex(index));
! loadTuple(method, tuple, false);
method.dynamicSetIndex(callSiteFlags);
} else {
method.dup();
! loadTuple(method, tuple, false);
method.dynamicSet(property.getKey(), codegen.getCallSiteFlags(), false);
}
}
}
< prev index next >