X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FGSS.java;h=5ed098859995f0534dcd9da71178d52500bb62be;hp=69d9eedd9ca47ace174051567865632b399d6d95;hb=b0d313eb49712b23f9c71003c96f130f23a63526;hpb=72d5880c192b7fbd525c97ded4cf11e935c58cc8 diff --git a/src/edu/berkeley/sbp/GSS.java b/src/edu/berkeley/sbp/GSS.java index 69d9eed..5ed0988 100644 --- a/src/edu/berkeley/sbp/GSS.java +++ b/src/edu/berkeley/sbp/GSS.java @@ -178,21 +178,22 @@ class GSS { public class Node { private Forest.Ref holder = null; + private HashMap cache = null; - public HashMap cache() { return cache==null ? (cache = new HashMap()) : cache; } - public Forest.Ref holder() { return holder==null ? (holder = new Forest.Ref()) : holder; } - public Forest pending() { return Phase.this.closed ? holder().resolve() : holder; } - public FastSet parents() { return parents; } + /** the set of nodes to which there is an edge starting at this node */ + public final FastSet parents = new FastSet(); /* ALLOC */ - /** which Phase this Node belongs to (node that Node is also a non-static inner class of Phase) */ - public final Phase phase = Phase.this; /** 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; - /** the set of nodes to which there is an edge starting at this node */ - public final FastSet parents = new FastSet(); /* ALLOC */ + public HashMap cache() { return cache==null ? (cache = new HashMap()) : cache; } + public Forest.Ref holder() { return holder==null ? (holder = new Forest.Ref()) : holder; } + public Forest pending() { return Phase.this.closed ? holder().resolve() : holder; } + public FastSet parents() { return parents; } /** FIXME */ public void queueReductions() {