summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@well-typed.com>2019-02-05 21:17:36 -0500
committerBen Gamari <ben@smart-cactus.org>2019-10-18 15:26:53 -0400
commit81d4675eea81314ef0df2a20bf621fb383b6958d (patch)
tree997d2ede4d851932baf7fd460c53ee371d92ac8e /rts
parent206f782a69ce8b0be7a39570abc09dfdf1514f18 (diff)
downloadhaskell-81d4675eea81314ef0df2a20bf621fb383b6958d.tar.gz
rts/GC: Refactor gcCAFs
Diffstat (limited to 'rts')
-rw-r--r--rts/sm/GC.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 76237f35c2..3f301aeb53 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -1841,21 +1841,16 @@ resize_nursery (void)
#if defined(DEBUG)
-static void gcCAFs(void)
+void gcCAFs(void)
{
- StgIndStatic *p, *prev;
+ uint32_t i = 0;
+ StgIndStatic *prev = NULL;
- const StgInfoTable *info;
- uint32_t i;
-
- i = 0;
- p = debug_caf_list;
- prev = NULL;
-
- for (p = debug_caf_list; p != (StgIndStatic*)END_OF_CAF_LIST;
- p = (StgIndStatic*)p->saved_info) {
-
- info = get_itbl((StgClosure*)p);
+ for (StgIndStatic *p = debug_caf_list;
+ p != (StgIndStatic*) END_OF_CAF_LIST;
+ p = (StgIndStatic*) p->saved_info)
+ {
+ const StgInfoTable *info = get_itbl((StgClosure*)p);
ASSERT(info->type == IND_STATIC);
// See Note [STATIC_LINK fields] in Storage.h