diff options
author | Arash Rouhani <rarash@student.chalmers.se> | 2014-02-13 15:28:11 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2014-04-29 20:34:08 +0100 |
commit | 43b3bab38eafef8c02a09fb4ff1e757f5cba6073 (patch) | |
tree | 3e86f1eb988adbad8c446b5ec6365151e0503b25 /includes/rts/storage/ClosureMacros.h | |
parent | b7278d3d7bbe384eee7538b1e50bb741e99fb01d (diff) | |
download | haskell-43b3bab38eafef8c02a09fb4ff1e757f5cba6073.tar.gz |
Rts: Consistently use StgWord for sizes of bitmaps
A long debate is in issue #8742, but the main motivation is that this
allows for applying a patch to reuse the function scavenge_small_bitmap
without changing the .o-file output.
Similarly, I changed the types in rts/sm/Compact.c, so I can create
a STATIC_INLINE function for the redundant code block:
while (size > 0) {
if ((bitmap & 1) == 0) {
thread((StgClosure **)p);
}
p++;
bitmap = bitmap >> 1;
size--;
}
Diffstat (limited to 'includes/rts/storage/ClosureMacros.h')
-rw-r--r-- | includes/rts/storage/ClosureMacros.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h index 92b78de6f7..3407b716c8 100644 --- a/includes/rts/storage/ClosureMacros.h +++ b/includes/rts/storage/ClosureMacros.h @@ -338,6 +338,11 @@ EXTERN_INLINE StgWord bco_sizeW ( StgBCO *bco ); EXTERN_INLINE StgWord bco_sizeW ( StgBCO *bco ) { return bco->size; } +/* + * TODO: Consider to switch return type from 'nat' to 'StgWord' #8742 + * + * (Also for 'closure_sizeW' below) + */ EXTERN_INLINE nat closure_sizeW_ (StgClosure *p, StgInfoTable *info); EXTERN_INLINE nat closure_sizeW_ (StgClosure *p, StgInfoTable *info) |