checkpoint
[sbp.git] / src / edu / berkeley / sbp / GSS.java
index 8165ccd..45de091 100644 (file)
@@ -90,7 +90,7 @@ class GSS {
                 int count = 0;
                 Parser.Table.Reduction r = null;
                 for(Parser.Table.Reduction red : token==null ? state.getEofReductions() : state.getReductions(token)) { r = red; count++; }
-                //if (count==0) return;     // BEWARE! this optimization is suspected to cause really nasty heisenbugs
+                if (count==0) return;     // BEWARE! this optimization is suspected to cause really nasty heisenbugs
                 //if (count > 1) break;
                 //if (r.numPop == 0) break;
                 //r.reduce(pending, parent, null, Phase.this, null);
@@ -166,6 +166,7 @@ class GSS {
         public final class Node {
 
             private Forest.Ref holder = null;
+            private boolean allqueued = false;
 
             private HashMap<Parser.Table.Reduction,Forest> cache = null;
 
@@ -174,6 +175,7 @@ class GSS {
 
             /** what state this node is in */
             public final Parser.Table.State state;
+
             /** which Phase this Node belongs to (node that Node is also a non-static inner class of Phase) */
             public final Phase phase = Phase.this;
 
@@ -192,13 +194,9 @@ class GSS {
                 for(Node n : h) queueReductions(n);
             }
 
-            private boolean allqueued = false;
-            private HashSet<Node> queued = new HashSet<Node>();
             /** FIXME */
             public void queueReductions(Node n2) {
                 if (!allqueued) { queueReductions(); return; }
-                if (queued.contains(n2)) return;
-                queued.add(n2);
                 Node n = this;
                 for(Parser.Table.Reduction r : token==null ? n.state.getEofReductions() : n.state.getReductions(token)) {