Mercurial > hg > truffle
changeset 5416:bd5624f04067
do not canonicalize scaled indexedlocation nodes if target is not available
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 18 May 2012 15:49:23 +0200 |
parents | 79f12805362b |
children | 791eb4f85b29 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java Fri May 18 15:48:38 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/IndexedLocationNode.java Fri May 18 15:49:23 2012 +0200 @@ -72,7 +72,10 @@ CiConstant constantIndex = index.asConstant(); if (constantIndex != null && constantIndex.kind.stackKind().isInt()) { long constantIndexLong = constantIndex.asInt(); - if (indexScalingEnabled && tool.target() != null) { + if (indexScalingEnabled) { + if (tool.target() == null) { + return this; + } constantIndexLong *= tool.target().sizeInBytes(getValueKind()); } constantIndexLong += displacement();