| 138235 | // performed by this function. To prepare the shifts, we have to adjust |
| 138236 | // change(w+), shift(w+), and change(w-). |
| 138237 | function executeShifts(v) { |
| 138238 | var shift = 0, change = 0, children = v.children, i = children.length, w; |
| 138239 | while(--i >= 0){ |
| 138240 | w = children[i]; |
| 138241 | w.z += shift; |
| 138242 | w.m += shift; |
| 138243 | shift += w.s + (change += w.c); |
| 138244 | } |
| 138245 | } |
| 138246 | // If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise, |
| 138247 | // returns the specified (default) ancestor. |
| 138248 | function nextAncestor(vim, v, ancestor) { |