From: adam Date: Wed, 4 Jan 2006 09:23:20 +0000 (-0500) Subject: checkpoint X-Git-Tag: tag_for_25-Mar~454 X-Git-Url: http://git.megacz.com/?p=sbp.git;a=commitdiff_plain;h=a0aaf681661f1e5df50324b2c6619e7ea709c00c checkpoint darcs-hash:20060104092320-5007d-2e8781b9f79466022e7637a99ffa9e3c60574615.gz --- diff --git a/src/edu/berkeley/sbp/GSS.java b/src/edu/berkeley/sbp/GSS.java index 8165ccd..45de091 100644 --- a/src/edu/berkeley/sbp/GSS.java +++ b/src/edu/berkeley/sbp/GSS.java @@ -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 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 queued = new HashSet(); /** 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)) {