diff graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/StampTool.java @ 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 308cedd2aaa2
children 369a3f9d1ceb
line wrap: on
line diff
--- 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;
     }