Mercurial > hg > truffle
changeset 16003:83433cf49019
Fix incorrect null check in oop compression.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 03 Jun 2014 11:01:58 +0200 |
parents | c60362c5150f |
children | f5ae86b125fd 66a9286203a2 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CompressionNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampTool.java |
diffstat | 2 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CompressionNode.java Tue Jun 03 10:52:22 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CompressionNode.java Tue Jun 03 11:01:58 2014 +0200 @@ -167,7 +167,7 @@ public void generate(NodeLIRBuilderTool gen) { HotSpotLIRGenerator hsGen = (HotSpotLIRGenerator) gen.getLIRGeneratorTool(); boolean nonNull; - if (getInput().stamp() instanceof ObjectStamp) { + if (getInput().stamp() instanceof AbstractObjectStamp) { nonNull = StampTool.isObjectNonNull(getInput().stamp()); } else { // metaspace pointers are never null
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampTool.java Tue Jun 03 10:52:22 2014 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampTool.java Tue Jun 03 11:01:58 2014 +0200 @@ -504,8 +504,8 @@ * always null */ public static boolean isObjectAlwaysNull(Stamp stamp) { - if (stamp instanceof ObjectStamp && stamp.isLegal()) { - return ((ObjectStamp) stamp).alwaysNull(); + if (stamp instanceof AbstractObjectStamp && stamp.isLegal()) { + return ((AbstractObjectStamp) stamp).alwaysNull(); } return false; } @@ -530,8 +530,8 @@ * always null */ public static boolean isObjectNonNull(Stamp stamp) { - if (stamp instanceof ObjectStamp && stamp.isLegal()) { - return ((ObjectStamp) stamp).nonNull(); + if (stamp instanceof AbstractObjectStamp && stamp.isLegal()) { + return ((AbstractObjectStamp) stamp).nonNull(); } return false; } @@ -555,8 +555,8 @@ * @return the Java type this stamp has if it is a legal Object stamp, null otherwise */ public static ResolvedJavaType typeOrNull(Stamp stamp) { - if (stamp instanceof ObjectStamp && stamp.isLegal()) { - return ((ObjectStamp) stamp).type(); + if (stamp instanceof AbstractObjectStamp && stamp.isLegal()) { + return ((AbstractObjectStamp) stamp).type(); } return null; } @@ -584,8 +584,8 @@ * @return true if this node represents a legal object stamp whose Java type is known exactly */ public static boolean isExactType(Stamp stamp) { - if (stamp instanceof ObjectStamp && stamp.isLegal()) { - return ((ObjectStamp) stamp).isExactType(); + if (stamp instanceof AbstractObjectStamp && stamp.isLegal()) { + return ((AbstractObjectStamp) stamp).isExactType(); } return false; }