From 390b254a3d680502e11c8f1d9f17d5606f62c82c Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 16 Sep 2006 03:30:30 -0400 Subject: [PATCH] questionable hack to reduce maximum stack depth darcs-hash:20060916073030-5007d-6ea0b85b09cbde909e87503669317c4247f3e32c.gz --- src/edu/berkeley/sbp/GSS.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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); } -- 1.7.10.4