diff options
author | Reid Barton <rwbarton@gmail.com> | 2016-02-29 17:35:43 -0500 |
---|---|---|
committer | Reid Barton <rwbarton@gmail.com> | 2016-02-29 17:35:43 -0500 |
commit | 0fd5db798e31912f335e4553e939e1e783284495 (patch) | |
tree | 43f1d3c8466b7e4276dfb3bb25e2a1839d7265f8 /rts/sm/Scav.c | |
parent | 49c55e68aae9841c166430ae566b0d9bdc03c99d (diff) | |
download | haskell-wip/rwbarton-tiny-tables.tar.gz |
Experiment with one-byte info tableswip/rwbarton-tiny-tables
Diffstat (limited to 'rts/sm/Scav.c')
-rw-r--r-- | rts/sm/Scav.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c index 953f055d57..b6783749c5 100644 --- a/rts/sm/Scav.c +++ b/rts/sm/Scav.c @@ -174,6 +174,19 @@ static StgPtr scavenge_mut_arr_ptrs_marked (StgMutArrPtrs *a) } STATIC_INLINE StgPtr +scavenge_tiny_bitmap (StgPtr p, uint8_t layout) +{ + while (layout > 1) { + if ((layout & 1) == 0) { + evacuate((StgClosure **)p); + } + p++; + layout = layout >> 1; + } + return p; +} + +STATIC_INLINE StgPtr scavenge_small_bitmap (StgPtr p, StgWord size, StgWord bitmap) { while (size > 0) { @@ -1807,6 +1820,13 @@ scavenge_stack(StgPtr p, StgPtr stack_end) */ while (p < stack_end) { + if (*p & 1) { + // Tiny liveness layout: no SRT + uint8_t liveness = *((uint8_t *)(*p) - 1); + p = scavenge_tiny_bitmap(p+1, liveness); + continue; + } + info = get_ret_itbl((StgClosure *)p); switch (info->i.type) { |