- HashSet<Phase.Node> s = new HashSet<Phase.Node>();
- s.addAll(hash.values());
- for(Phase.Node n : s) n.queueEmptyReductions();
- for(Phase.Node n : s) n.queueReductions();
+ if (reducing_list==null || reducing_list.length < hash.size())
+ reducing_list = new Phase.Node[hash.size() * 4];
+ Collection<Node> hv = hash.values();
+ hv.toArray(reducing_list);
+ int num = hv.size();
+ for(int i=0; i<num; i++) {
+ Node n = reducing_list[i];
+ reducing_list[i] = null;
+ n.queueEmptyReductions();
+ n.queueReductions();
+ }