src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/MapCreator.java
Print this page
*** 98,116 ****
assert tuples != null;
for (final MapTuple<T> tuple : tuples) {
final String key = tuple.key;
final Symbol symbol = tuple.symbol;
//TODO initial type is object here no matter what. Is that right?
if (symbol != null && !isValidArrayIndex(getArrayIndex(key))) {
final int flags = getPropertyFlags(symbol, hasArguments, false);
properties.add(
new SpillProperty(
key,
flags,
! spillIndex++));
}
}
return PropertyMap.newMap(properties, structure.getName(), 0, 0, spillIndex);
}
--- 98,118 ----
assert tuples != null;
for (final MapTuple<T> tuple : tuples) {
final String key = tuple.key;
final Symbol symbol = tuple.symbol;
+ final Class<?> initialType = tuple.getValueType();
//TODO initial type is object here no matter what. Is that right?
if (symbol != null && !isValidArrayIndex(getArrayIndex(key))) {
final int flags = getPropertyFlags(symbol, hasArguments, false);
properties.add(
new SpillProperty(
key,
flags,
! spillIndex++,
! initialType));
}
}
return PropertyMap.newMap(properties, structure.getName(), 0, 0, spillIndex);
}