Commit 455477a3 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan

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
parent 4075656e
......@@ -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
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment