summaryrefslogtreecommitdiff
path: root/rts/sm
diff options
context:
space:
mode:
Diffstat (limited to 'rts/sm')
-rw-r--r--rts/sm/CNF.c3
-rw-r--r--rts/sm/GC.c2
-rw-r--r--rts/sm/MarkWeak.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/rts/sm/CNF.c b/rts/sm/CNF.c
index 31b3cb99f2..bfe6493cfa 100644
--- a/rts/sm/CNF.c
+++ b/rts/sm/CNF.c
@@ -227,9 +227,8 @@ compactAllocateBlockInternal(Capability *cap,
break;
default:
-#if defined(DEBUG)
ASSERT(!"code should not be reached");
-#else
+#if !defined(DEBUG)
RTS_UNREACHABLE;
#endif
}
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 1a71bd7bf0..21b7b17f0d 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -1545,8 +1545,8 @@ releaseGCThreads (Capability *cap USED_IF_THREADS, bool idle_cap[])
const uint32_t n_threads = n_capabilities;
const uint32_t me = cap->no;
uint32_t i;
-#if defined(DEBUG)
uint32_t num_idle = 0;
+#if defined(ASSERTS_ENABLED)
for(i=0; i < n_threads; ++i) {
ASSERT(!(i==me && idle_cap[i]));
if (idle_cap[i]) { ++num_idle;}
diff --git a/rts/sm/MarkWeak.c b/rts/sm/MarkWeak.c
index b8d120823c..379e3aaa80 100644
--- a/rts/sm/MarkWeak.c
+++ b/rts/sm/MarkWeak.c
@@ -417,7 +417,7 @@ markWeakPtrList ( void )
for (w = gen->weak_ptr_list; w != NULL; w = RELAXED_LOAD(&w->link)) {
// w might be WEAK, EVACUATED, or DEAD_WEAK (actually CON_STATIC) here
-#if defined(DEBUG)
+#if defined(ASSERTS_ENABLED)
{ // careful to do this assertion only reading the info ptr
// once, because during parallel GC it might change under our feet.
const StgInfoTable *info = RELAXED_LOAD(&w->header.info);