summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2020-02-18 09:38:27 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-29 05:08:36 -0500
commitb5fb58fd1a4a24b9273d9d2de65b6347e1654e98 (patch)
treeeec82775f0414f77d5444cd9e25a2885ba378a6e /includes
parenta999ee96a22650b59855609f84e2808b4133e9e0 (diff)
downloadhaskell-b5fb58fd1a4a24b9273d9d2de65b6347e1654e98.tar.gz
Document and refactor a few things around bitmap scavenging
- Added a few comments in StgPAP - Added a few comments and assertions in scavenge_small_bitmap and walk_large_bitmap - Did tiny refactor in GHC.Data.Bitmap: added some comments, deleted dead code, used PlatformWordSize type.
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/storage/Closures.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
index b2b5eda407..81b6fd1fe1 100644
--- a/includes/rts/storage/Closures.h
+++ b/includes/rts/storage/Closures.h
@@ -104,6 +104,12 @@ typedef struct {
StgClosure *selectee;
} StgSelector;
+/*
+ PAP payload contains pointers and non-pointers interleaved and we only have
+ one info table for PAPs (stg_PAP_info). To visit pointers in a PAP payload we
+ use the `fun`s bitmap. For a PAP with n_args arguments the first n_args bits
+ in the fun's bitmap tell us which payload locations contain pointers.
+*/
typedef struct {
StgHeader header;
StgHalfWord arity; /* zero if it is an AP */