changeset 15425:a92ff90899b6

[flow-sensitive] explicit assert about anchor being FixedNode
author Miguel Garcia <miguel.m.garcia@oracle.com>
date Mon, 28 Apr 2014 15:05:42 +0200
parents 96ed2167f79c
children e9029a026dc9
files graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java	Sun Apr 27 15:57:44 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java	Mon Apr 28 15:05:42 2014 +0200
@@ -514,6 +514,7 @@
         if (isDependencyTainted(object, anchor)) {
             return false;
         }
+        assert anchor instanceof FixedNode;
         ResolvedJavaType stampType = StampTool.typeOrNull(object);
         if (stampType != null && !stampType.isInterface()) {
             return trackIO(object, stampType, anchor);
@@ -548,6 +549,7 @@
         if (isDependencyTainted(object, anchor)) {
             return false;
         }
+        assert anchor instanceof FixedNode;
         Witness w = getOrElseAddTypeInfo(object);
         if (w.trackCC(observed, anchor)) {
             versionNr++;
@@ -573,6 +575,7 @@
         if (isDependencyTainted(object, anchor)) {
             return false;
         }
+        assert anchor instanceof FixedNode;
         Witness w = getOrElseAddTypeInfo(object);
         if (w.trackIO(observed, anchor)) {
             versionNr++;
@@ -611,6 +614,7 @@
      */
     public void addFact(boolean isTrue, LogicNode condition, GuardingNode anchor) {
         assert anchor != null;
+        assert anchor instanceof FixedNode;
         assert !isUnreachable;
 
         if (condition instanceof LogicConstantNode) {
@@ -699,6 +703,7 @@
         if (isDependencyTainted(equals.y(), anchor)) {
             return;
         }
+        assert anchor instanceof FixedNode;
         ValueNode x = GraphUtil.unproxify(equals.x());
         ValueNode y = GraphUtil.unproxify(equals.y());
         if (isTrue) {
@@ -757,6 +762,7 @@
         if (isDependencyTainted(value, anchor)) {
             return;
         }
+        assert anchor instanceof FixedNode;
         ValueNode original = GraphUtil.unproxify(value);
         boolean wasNull = isNull(original);
         boolean wasNonNull = isNonNull(original);