summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-01-28 09:04:42 -0500
committerZubin Duggal <zubin.duggal@gmail.com>2023-02-08 19:05:11 +0530
commit5721baa1559b31950e62f769687feddb53bffc4c (patch)
tree5942c6a73369f0b00fa3beaa5c842857a4ba7979
parent85a080e9332e27edb43eb1fcbb67eb63776d5d09 (diff)
downloadhaskell-5721baa1559b31950e62f769687feddb53bffc4c.tar.gz
nonmoving: Fix unregisterised build
(cherry picked from commit 6df2709e7215ea80d7267800e0318aee2a7c277f)
-rw-r--r--rts/sm/NonMoving.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/sm/NonMoving.h b/rts/sm/NonMoving.h
index 63e3f9ca7e..0a99f3a9b2 100644
--- a/rts/sm/NonMoving.h
+++ b/rts/sm/NonMoving.h
@@ -332,10 +332,14 @@ INLINE_HEADER bool nonmovingClosureBeingSwept(StgClosure *p)
}
}
+// N.B. RtsFlags is defined as a pointer in STG code consequently this code
+// doesn't typecheck.
+#if !IN_STG_CODE
INLINE_HEADER bool isNonmovingClosure(StgClosure *p)
{
return RtsFlags.GcFlags.useNonmoving && (!HEAP_ALLOCED_GC(p) || Bdescr((P_)p)->flags & BF_NONMOVING);
}
+#endif
#if defined(DEBUG)