projects
/
sbp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6c2a17e
)
checkpoint
author
adam
<adam@megacz.com>
Wed, 4 Jan 2006 09:23:20 +0000
(
04:23
-0500)
committer
adam
<adam@megacz.com>
Wed, 4 Jan 2006 09:23:20 +0000
(
04:23
-0500)
darcs-hash:
20060104092320
-5007d-
2e8781b9f79466022e7637a99ffa9e3c60574615
.gz
src/edu/berkeley/sbp/GSS.java
patch
|
blob
|
history
diff --git
a/src/edu/berkeley/sbp/GSS.java
b/src/edu/berkeley/sbp/GSS.java
index
8165ccd
..
45de091
100644
(file)
--- 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++; }
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);
//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;
public final class Node {
private Forest.Ref holder = null;
+ private boolean allqueued = false;
private HashMap<Parser.Table.Reduction,Forest> cache = null;
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;
/** 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;
/** 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);
}
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; }
/** 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)) {
Node n = this;
for(Parser.Table.Reduction r : token==null ? n.state.getEofReductions() : n.state.getReductions(token)) {