X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FGCCompact.h;h=6dece4f760fd9a85b87ec64dc72d997451722656;hb=ab3d1f285cef784138d99e70f7359ea6e67f6c25;hp=4de4bf32934ec9ecb9d88826a4aa44dd09864921;hpb=e2c87ca75e8f4833145c31a3b7b2ffeefeae7679;p=ghc-hetmet.git diff --git a/ghc/rts/GCCompact.h b/ghc/rts/GCCompact.h index 4de4bf3..6dece4f 100644 --- a/ghc/rts/GCCompact.h +++ b/ghc/rts/GCCompact.h @@ -1,5 +1,4 @@ /* ----------------------------------------------------------------------------- - * $Id: GCCompact.h,v 1.2 2001/07/30 13:06:18 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -7,33 +6,33 @@ * * ---------------------------------------------------------------------------*/ -static inline void +INLINE_HEADER void mark(StgPtr p, bdescr *bd) { nat offset_within_block = p - bd->start; // in words StgPtr bitmap_word = (StgPtr)bd->u.bitmap + (offset_within_block / (sizeof(W_)*BITS_PER_BYTE)); - nat bit_mask = 1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); + StgWord bit_mask = (StgWord)1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); *bitmap_word |= bit_mask; } -static inline void +INLINE_HEADER void unmark(StgPtr p, bdescr *bd) { nat offset_within_block = p - bd->start; // in words StgPtr bitmap_word = (StgPtr)bd->u.bitmap + (offset_within_block / (sizeof(W_)*BITS_PER_BYTE)); - nat bit_mask = 1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); + StgWord bit_mask = (StgWord)1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); *bitmap_word &= ~bit_mask; } -static inline int +INLINE_HEADER StgWord is_marked(StgPtr p, bdescr *bd) { nat offset_within_block = p - bd->start; // in words StgPtr bitmap_word = (StgPtr)bd->u.bitmap + (offset_within_block / (sizeof(W_)*BITS_PER_BYTE)); - nat bit_mask = 1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); + StgWord bit_mask = (StgWord)1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); return (*bitmap_word & bit_mask); }