From d7bbaf5d45fd7b88ce331659abe29d16d086684b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Tue, 16 Jul 2019 13:49:16 +0200 Subject: rts: TraverseHeap: Make trav. data macros into functions This allows the global 'flip' variable not to be exported. This allows a future commit to also make it part of the traversalState struct. --- rts/RetainerProfile.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'rts/RetainerProfile.c') diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c index a996e8d2e2..7222bed0ad 100644 --- a/rts/RetainerProfile.c +++ b/rts/RetainerProfile.c @@ -251,7 +251,14 @@ associate( StgClosure *c, RetainerSet *s ) { // StgWord has the same size as pointers, so the following type // casting is okay. - RSET(c) = ((StgWord)s | flip); + setTravData(c, (StgWord)s); +} + +inline RetainerSet* +retainerSetOf( const StgClosure *c ) +{ + ASSERT(isTravDataValid(c)); + return (RetainerSet*)getTravData(c); } static bool -- cgit v1.2.1