| 68 | } |
| 69 | |
| 70 | forceinline void |
| 71 | IntTraceView::prune(Space& home, IntView y, const Delta& d) { |
| 72 | if (y.range() && (dom->next() == nullptr)) { |
| 73 | dom->min(y.min()); dom->max(y.max()); |
| 74 | } else if (!y.any(d) && (y.max(d)+1 == y.min())) { |
| 75 | // The lower bound has been adjusted |
| 76 | if (y.min() > dom->max()) { |
| 77 | RangeList* p = dom; |
| 78 | RangeList* l = p->next(); |
| 79 | while ((l != nullptr) && (l->max() < y.min())) { |
| 80 | p=l; l=l->next(); |
| 81 | } |
| 82 | dom->dispose(home,p); |
| 83 | dom = l; |
| 84 | } |
| 85 | dom->min(y.min()); |
| 86 | } else if (!y.any(d) && (y.max()+1 == y.min(d))) { |
| 87 | // upper bound has been adjusted |
| 88 | if ((y.max() <= dom->max()) && (dom->next() == nullptr)) { |
| 89 | dom->max(y.max()); |
| 90 | } else { |
| 91 | RangeList* p = dom; |
| 92 | RangeList* l = p->next(); |
| 93 | while ((l != nullptr) && (l->min() <= y.max())) { |
| 94 | p=l; l=l->next(); |
| 95 | } |
| 96 | p->max(y.max()); |
| 97 | if (p->next() != nullptr) |
| 98 | p->next()->dispose(home); |
| 99 | p->next(nullptr); |
| 100 | } |
| 101 | } else { |
| 102 | // Just copy the domain |
| 103 | ViewRanges<IntView> yr(y); |
| 104 | RangeList::overwrite(home,dom,yr); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | forceinline void |
| 109 | IntTraceView::update(Space& home, IntTraceView y) { |