Merge branches 'wip/gc/segment-header-to-bdescr' and 'wip/gc/docs' into wip/gc/everyt...
authorBen Gamari <ben@smart-cactus.org>
Wed, 19 Jun 2019 01:43:19 +0000 (21:43 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 19 Jun 2019 01:43:19 +0000 (21:43 -0400)
1  2  3 
rts/sm/NonMoving.c
rts/sm/NonMoving.h
rts/sm/NonMovingMark.c

Simple merge
Simple merge
@@@@ -1211,10 -1208,10 -1218,10 +1221,10 @@@@ mark_closure (MarkQueue *queue, const S
               uint8_t mark = nonmovingGetMark(seg, block_idx);
               /* Don't mark things we've already marked (since we may loop) */
               if (mark == nonmovingMarkEpoch)
 --                return;
 ++                goto done;
   
               StgClosure *snapshot_loc =
- -              (StgClosure *) nonmovingSegmentGetBlock(seg, seg->next_free_snap);
+ +              (StgClosure *) nonmovingSegmentGetBlock(seg, nonmovingSegmentInfo(seg)->next_free_snap);
               if (p >= snapshot_loc && mark == 0) {
                   /*
                    * In this case we are looking at a block that wasn't allocated
       }
   
   
 --    case IND:
 --    case BLACKHOLE:
 ++    case IND: {
 +         PUSH_FIELD((StgInd *) p, indirectee);
 ++        if (origin != NULL) {
 ++            p_next = ((StgInd*)p)->indirectee;
 ++        }
 +         break;
 ++    }
 ++
 ++    case BLACKHOLE: {
  +        PUSH_FIELD((StgInd *) p, indirectee);
 ++        StgClosure *indirectee = ((StgInd*)p)->indirectee;
 ++        if (GET_CLOSURE_TAG(indirectee) == 0 || origin == NULL) {
 ++            // do nothing
 ++        } else {
 ++            p_next = indirectee;
 ++        }
  +        break;
 ++    }
   
       case MUT_VAR_CLEAN:
       case MUT_VAR_DIRTY: