diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-06-05 17:01:12 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-06-05 17:01:22 +0300 |
commit | 455477a3675c53ce186b3e75ec88f5488fec792c (patch) | |
tree | c934bd9ed0aa95c63f62040404560d8eead0ab30 | |
parent | 4075656e8bb2338d9857acfa54f8b9c5e0661f44 (diff) | |
download | haskell-455477a3675c53ce186b3e75ec88f5488fec792c.tar.gz |
rts: Reuse dbl_link_remove in a few places
Test Plan: this validates
Reviewers: simonmar, bgamari, erikd
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4795
-rw-r--r-- | rts/sm/Evac.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c index 3415a4ace1..deaad27e6b 100644 --- a/rts/sm/Evac.c +++ b/rts/sm/Evac.c @@ -278,14 +278,7 @@ evacuate_large(StgPtr p) } // remove from large_object list - if (bd->u.back) { - bd->u.back->link = bd->link; - } else { // first object in the list - gen->large_objects = bd->link; - } - if (bd->link) { - bd->link->u.back = bd->u.back; - } + dbl_link_remove(bd, &gen->large_objects); /* link it on to the evacuated large object list of the destination gen */ @@ -414,14 +407,7 @@ evacuate_compact (StgPtr p) } // remove from compact_objects list - if (bd->u.back) { - bd->u.back->link = bd->link; - } else { // first object in the list - gen->compact_objects = bd->link; - } - if (bd->link) { - bd->link->u.back = bd->u.back; - } + dbl_link_remove(bd, &gen->compact_objects); /* link it on to the evacuated compact object list of the destination gen */ |