[commit: ghc] master: Comment on StgArrWords vs StgArrBytes (ac5ff64)
git at git.haskell.org
git at git.haskell.org
Fri Nov 22 14:22:50 UTC 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/ac5ff6422fb9e143c38e6cdcf16280de200cb880/ghc
>---------------------------------------------------------------
commit ac5ff6422fb9e143c38e6cdcf16280de200cb880
Author: Arash Rouhani <rarash at student.chalmers.se>
Date: Thu Nov 21 14:17:45 2013 +0100
Comment on StgArrWords vs StgArrBytes
See #8552
Signed-off-by: Arash Rouhani <rarash at student.chalmers.se>
Reviewed-by: Austin Seipp <austin at well-typed.com>
>---------------------------------------------------------------
ac5ff6422fb9e143c38e6cdcf16280de200cb880
includes/rts/storage/Closures.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
index 09e7021..2704128 100644
--- a/includes/rts/storage/Closures.h
+++ b/includes/rts/storage/Closures.h
@@ -135,11 +135,18 @@ typedef struct StgBlockingQueue_ {
struct MessageBlackHole_ *queue;
} StgBlockingQueue;
+/* This struct should be called StgArrBytes rather than StgArrWords.
+ *
+ * One might be very tempted to store the number of words in the bytes field,
+ * but the garbage collector will erase your data then.
+ *
+ * It's name is for historical reasons, see #3800
+ */
typedef struct {
StgHeader header;
StgWord bytes;
StgWord payload[FLEXIBLE_ARRAY];
-} StgArrWords;
+} StgArrWords; // TODO: s/StgArrWords/StgArrBytes (#8552)
typedef struct {
StgHeader header;
More information about the ghc-commits
mailing list