diff graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/UseTrappingNullChecksPhase.java @ 18490:ca81508f2a19

Generalize NULL handling to work on arbitrary pointers.
author Roland Schatz <roland.schatz@oracle.com>
date Mon, 24 Nov 2014 13:53:14 +0100
parents 0f4813e0b4a9
children f57d86eb036f
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/UseTrappingNullChecksPhase.java	Mon Nov 24 13:20:02 2014 +0100
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/UseTrappingNullChecksPhase.java	Mon Nov 24 13:53:14 2014 +0100
@@ -100,7 +100,7 @@
             for (AbstractEndNode end : merge.cfgPredecessors().snapshot()) {
                 ValueNode thisReason = reasons != null ? reasons.get(index) : reason;
                 ValueNode thisSpeculation = speculations != null ? speculations.get(index++) : speculation;
-                if (!thisReason.isConstant() || !thisSpeculation.isConstant() || !thisSpeculation.asConstant().equals(JavaConstant.NULL_OBJECT)) {
+                if (!thisReason.isConstant() || !thisSpeculation.isConstant() || !thisSpeculation.asConstant().equals(JavaConstant.NULL_POINTER)) {
                     continue;
                 }
                 DeoptimizationReason deoptimizationReason = metaAccessProvider.decodeDeoptReason(thisReason.asJavaConstant());
@@ -113,7 +113,7 @@
         if (deoptimizationReason != DeoptimizationReason.NullCheckException && deoptimizationReason != DeoptimizationReason.UnreachedCode) {
             return;
         }
-        if (speculation != null && !speculation.equals(JavaConstant.NULL_OBJECT)) {
+        if (speculation != null && !speculation.equals(JavaConstant.NULL_POINTER)) {
             return;
         }
         if (predecessor instanceof MergeNode) {