- Forest[] holder = new Forest[r.position.pos];
- if (r.position.pos<=0) throw new Error("called wrong form of reduce()");
- int pos = r.position.pos-1;
- Forest old = holder[pos];
- holder[pos] = n.pending();
- if (pos==0) {
- System.arraycopy(holder, 0, r.position.holder, 0, holder.length);
- Forest rex = r.position.rewrite(n.phase().getLocation());
- n2.finish(r, rex, n.phase(), holder);
- } else {
- n2.reduce(r, pos-1, n.phase(), holder);
- }
- holder[pos] = old;
+ if (r.pos<=0) throw new Error("called wrong form of reduce()");
+ int pos = r.pos-1;
+ n.reduce(r, pos, n.phase(), n2);