summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSiddhanathan Shanmugam <siddhanathan@gmail.com>2015-09-11 16:10:41 -0500
committerAustin Seipp <austin@well-typed.com>2015-09-11 18:33:32 -0500
commit7ad4b3c1419fefbb01fd4643f374150abd1d11e2 (patch)
tree46fed56f87cfd2b32ce5ec2537b04be95cbbda23 /includes
parent4275028c744ef8ee6bbc26c3a301ef2e3e8708a0 (diff)
downloadhaskell-7ad4b3c1419fefbb01fd4643f374150abd1d11e2.tar.gz
s/StgArrWords/StgArrBytes/
Rename StgArrWords to StgArrBytes (see Trac #8552) Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1233 GHC Trac Issues: #8552
Diffstat (limited to 'includes')
-rw-r--r--includes/Cmm.h4
-rw-r--r--includes/rts/storage/ClosureMacros.h12
-rw-r--r--includes/rts/storage/Closures.h13
3 files changed, 11 insertions, 18 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 908a3763ca..20d6e56228 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -540,10 +540,10 @@
-------------------------------------------------------------------------- */
/* The offset of the payload of an array */
-#define BYTE_ARR_CTS(arr) ((arr) + SIZEOF_StgArrWords)
+#define BYTE_ARR_CTS(arr) ((arr) + SIZEOF_StgArrBytes)
/* The number of words allocated in an array payload */
-#define BYTE_ARR_WDS(arr) ROUNDUP_BYTES_TO_WDS(StgArrWords_bytes(arr))
+#define BYTE_ARR_WDS(arr) ROUNDUP_BYTES_TO_WDS(StgArrBytes_bytes(arr))
/* Getting/setting the info pointer of a closure */
#define SET_INFO(p,info) StgHeader_info(p) = info
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h
index 64e549a641..a914059a5c 100644
--- a/includes/rts/storage/ClosureMacros.h
+++ b/includes/rts/storage/ClosureMacros.h
@@ -314,13 +314,13 @@ EXTERN_INLINE StgOffset pap_sizeW( StgPAP* x );
EXTERN_INLINE StgOffset pap_sizeW( StgPAP* x )
{ return PAP_sizeW(x->n_args); }
-EXTERN_INLINE StgWord arr_words_words( StgArrWords* x);
-EXTERN_INLINE StgWord arr_words_words( StgArrWords* x)
+EXTERN_INLINE StgWord arr_words_words( StgArrBytes* x);
+EXTERN_INLINE StgWord arr_words_words( StgArrBytes* x)
{ return ROUNDUP_BYTES_TO_WDS(x->bytes); }
-EXTERN_INLINE StgOffset arr_words_sizeW( StgArrWords* x );
-EXTERN_INLINE StgOffset arr_words_sizeW( StgArrWords* x )
-{ return sizeofW(StgArrWords) + arr_words_words(x); }
+EXTERN_INLINE StgOffset arr_words_sizeW( StgArrBytes* x );
+EXTERN_INLINE StgOffset arr_words_sizeW( StgArrBytes* x )
+{ return sizeofW(StgArrBytes) + arr_words_words(x); }
EXTERN_INLINE StgOffset mut_arr_ptrs_sizeW( StgMutArrPtrs* x );
EXTERN_INLINE StgOffset mut_arr_ptrs_sizeW( StgMutArrPtrs* x )
@@ -381,7 +381,7 @@ closure_sizeW_ (StgClosure *p, StgInfoTable *info)
case IND_PERM:
return sizeofW(StgInd);
case ARR_WORDS:
- return arr_words_sizeW((StgArrWords *)p);
+ return arr_words_sizeW((StgArrBytes *)p);
case MUT_ARR_PTRS_CLEAN:
case MUT_ARR_PTRS_DIRTY:
case MUT_ARR_PTRS_FROZEN:
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
index d872868a86..2ce1a27b23 100644
--- a/includes/rts/storage/Closures.h
+++ b/includes/rts/storage/Closures.h
@@ -135,18 +135,11 @@ 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; // TODO: s/StgArrWords/StgArrBytes (#8552)
+} StgArrBytes;
typedef struct {
StgHeader header;
@@ -243,8 +236,8 @@ typedef struct _StgCFinalizerList {
typedef struct {
StgHeader header;
- StgArrWords *instrs; /* a pointer to an ArrWords */
- StgArrWords *literals; /* a pointer to an ArrWords */
+ StgArrBytes *instrs; /* a pointer to an ArrWords */
+ StgArrBytes *literals; /* a pointer to an ArrWords */
StgMutArrPtrs *ptrs; /* a pointer to a MutArrPtrs */
StgHalfWord arity; /* arity of this BCO */
StgHalfWord size; /* size of this BCO (in words) */