diff options
author | Ömer Sinan Ağacan <omer@well-typed.com> | 2019-02-05 10:40:29 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-10-18 15:26:53 -0400 |
commit | 697be2b6908d926bf89fcc6cd173459e29022f51 (patch) | |
tree | 4bcf3a3027ad600a983a3976caa9e854c6292598 /includes/Rts.h | |
parent | c4c9904b324736dc5d190a91418e8d8f564d4104 (diff) | |
download | haskell-697be2b6908d926bf89fcc6cd173459e29022f51.tar.gz |
rts/GC: Add an obvious assertion during block initialization
Namely ensure that block descriptors are initialized with valid
generation numbers.
Co-Authored-By: Ben Gamari <ben@well-typed.com>
Diffstat (limited to 'includes/Rts.h')
-rw-r--r-- | includes/Rts.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/Rts.h b/includes/Rts.h index dd60726c39..56642e14c5 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -281,26 +281,27 @@ TICK_VAR(2) #define IF_RTSFLAGS(c,s) if (RtsFlags.c) { s; } doNothing() #if defined(DEBUG) +/* See Note [RtsFlags is a pointer in STG code] */ #if IN_STG_CODE #define IF_DEBUG(c,s) if (RtsFlags[0].DebugFlags.c) { s; } doNothing() #else #define IF_DEBUG(c,s) if (RtsFlags.DebugFlags.c) { s; } doNothing() -#endif +#endif /* IN_STG_CODE */ #else #define IF_DEBUG(c,s) doNothing() -#endif +#endif /* DEBUG */ #if defined(DEBUG) #define DEBUG_ONLY(s) s #else #define DEBUG_ONLY(s) doNothing() -#endif +#endif /* DEBUG */ #if defined(DEBUG) #define DEBUG_IS_ON 1 #else #define DEBUG_IS_ON 0 -#endif +#endif /* DEBUG */ /* ----------------------------------------------------------------------------- Useful macros and inline functions |