diff --git a/src/pd.cpp b/src/pd.cpp index 8160d73..be9aa63 100644 --- a/src/pd.cpp +++ b/src/pd.cpp @@ -173,8 +173,9 @@ void Pd::xlt_crd (Pd *pd, Crd xlt, Crd &crd) sb = (sb - mdb->node_base) + (mdb->node_phys - node->node_phys) + node->node_base; if ((ro = clamp (sb, rb, so, ro)) != ~0UL) { + trace (TRACE_DEL, "XLT OBJ PD:%p->%p SB:%#010lx RB:%#010lx O:%#04lx", pd, this, crd.base(), rb, so); crd = Crd (crd.type(), rb, ro, mdb->node_attr); - return; + return; } } } @@ -245,22 +246,32 @@ void Pd::rev_crd (Crd crd, bool self) void Pd::xfer_items (Pd *src, Crd xlt, Crd del, Xfer *s, Xfer *d, unsigned long ti) { - for (Crd crd; ti--; s--) { + mword set_as_del; + for (Crd crd; ti--; s--) { + crd = *s; + set_as_del = 0; - switch (s->flags() & 1) { + switch (s->flags() & 3) { case 0: xlt_crd (src, xlt, crd); break; + case 2: + xlt_crd (src, xlt, crd); + if (crd.type()) break; + + crd = *s; + set_as_del = 1; + case 1: del_crd (src == &root && s->flags() & 0x800 ? &kern : src, del, crd, s->flags() >> 9 & 3, s->hotspot()); break; }; if (d) - *d-- = Xfer (crd, s->flags()); + *d-- = Xfer (crd, s->flags() | set_as_del); } }