From: adam Date: Sat, 16 Sep 2006 07:30:30 +0000 (-0400) Subject: questionable hack to reduce maximum stack depth X-Git-Tag: tag_for_25-Mar~68 X-Git-Url: http://git.megacz.com/?p=sbp.git;a=commitdiff_plain;h=390b254a3d680502e11c8f1d9f17d5606f62c82c questionable hack to reduce maximum stack depth darcs-hash:20060916073030-5007d-6ea0b85b09cbde909e87503669317c4247f3e32c.gz --- diff --git a/src/edu/berkeley/sbp/GSS.java b/src/edu/berkeley/sbp/GSS.java index 5255a21..ac62e18 100644 --- a/src/edu/berkeley/sbp/GSS.java +++ b/src/edu/berkeley/sbp/GSS.java @@ -196,6 +196,8 @@ class GSS { return true; } + LinkedList reductionQueue = new LinkedList(); + /** perform all reduction operations */ public void reduce() throws ParseFailed { try { @@ -210,9 +212,11 @@ class GSS { // INVARIANT: we never "see" a node until its parent-set is complete, modulo merges } for(int i=0; i, IntegerMappable, GraphViz.ToGraphViz { public FastSet set = new FastSet(); - - private boolean allqueued = false; /** what state this node is in */ @@ -337,7 +339,7 @@ class GSS { } public void performReductions(Node n2) { - if (!allqueued) performReductions(); + if (!allqueued) reductionQueue.add(this);//performReductions(); else state.invokeReductions(token, this, this, n2); }