add LabelNode
[sbp.git] / src / edu / berkeley / sbp / Reduction.java
index 4ef2013..0266782 100644 (file)
@@ -9,9 +9,9 @@ final class Reduction implements Comparable<Reduction> {
     private Pos reduction;
     private GSS.Phase phase;
     private Forest forest;
-    private Node pred;
+    private StateNode pred;
     
-    public Reduction(Node pred, Pos reduction, Forest forest, GSS.Phase target) {
+    public Reduction(StateNode pred, Pos reduction, Forest forest, GSS.Phase target) {
         this.reduction = reduction;
         this.forest = forest;
         this.phase = target;
@@ -41,7 +41,8 @@ final class Reduction implements Comparable<Reduction> {
     }
 
     public void perform() {
-        Result.newResult(forest, pred, reduction, phase);
+        if (reduction==null) return;
+        phase.newNodeFromReduction(forest, reduction, pred);
     }
     public GSS.Phase predPhase() { return pred.phase(); }
     public Pos reduction() { return reduction; }