< prev index next >

src/jdk.scripting.nashorn/share/classes/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,183 **** 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 { assert property.getKey() instanceof String; // symbol keys not yet supported in object literals method.dup(); ! loadTuple(method, tuple); method.dynamicSet((String) property.getKey(), codegen.getCallSiteFlags(), false); } } } --- 165,181 ---- 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 { assert property.getKey() instanceof String; // symbol keys not yet supported in object literals method.dup(); ! loadTuple(method, tuple, false); method.dynamicSet((String) property.getKey(), codegen.getCallSiteFlags(), false); } } }
< prev index next >