From 206f782a69ce8b0be7a39570abc09dfdf1514f18 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Tue, 5 Feb 2019 11:01:10 -0500 Subject: rts: Give stack flags proper macros This were previously quite unclear and will change a bit under the non-moving collector so let's clear this up now. --- rts/sm/Sanity.c | 8 ++++---- rts/sm/Storage.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'rts/sm') diff --git a/rts/sm/Sanity.c b/rts/sm/Sanity.c index 3585bd93b4..289ac542b8 100644 --- a/rts/sm/Sanity.c +++ b/rts/sm/Sanity.c @@ -632,9 +632,9 @@ checkGlobalTSOList (bool checkTSOs) stack = tso->stackobj; while (1) { - if (stack->dirty & 1) { - ASSERT(Bdescr((P_)stack)->gen_no == 0 || (stack->dirty & TSO_MARKED)); - stack->dirty &= ~TSO_MARKED; + if (stack->dirty & STACK_DIRTY) { + ASSERT(Bdescr((P_)stack)->gen_no == 0 || (stack->dirty & STACK_SANE)); + stack->dirty &= ~STACK_SANE; } frame = (StgUnderflowFrame*) (stack->stack + stack->stack_size - sizeofW(StgUnderflowFrame)); @@ -669,7 +669,7 @@ checkMutableList( bdescr *mut_bd, uint32_t gen ) ((StgTSO *)p)->flags |= TSO_MARKED; break; case STACK: - ((StgStack *)p)->dirty |= TSO_MARKED; + ((StgStack *)p)->dirty |= STACK_SANE; break; } } diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 0130a08f7c..97c71478ed 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -1139,8 +1139,8 @@ dirty_TSO (Capability *cap, StgTSO *tso) void dirty_STACK (Capability *cap, StgStack *stack) { - if (stack->dirty == 0) { - stack->dirty = 1; + if (! (stack->dirty & STACK_DIRTY)) { + stack->dirty = STACK_DIRTY; recordClosureMutated(cap,(StgClosure*)stack); } } -- cgit v1.2.1