X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2Frts%2Fstorage%2FClosureMacros.h;fp=includes%2Frts%2Fstorage%2FClosureMacros.h;h=fa6a2a5448a48096baad926bccaf62e714d59c60;hb=17c8229adf9f268097e4c87053d940a918c3a26f;hp=56e7dca204f763efd8d81c18f679017202947e75;hpb=a0e32f1151a9bc765527bd9ee48a54a27ce1750e;p=ghc-hetmet.git diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h index 56e7dca..fa6a2a5 100644 --- a/includes/rts/storage/ClosureMacros.h +++ b/includes/rts/storage/ClosureMacros.h @@ -127,7 +127,7 @@ #define SET_ARR_HDR(c,info,costCentreStack,n_words) \ SET_HDR(c,info,costCentreStack); \ - (c)->words = n_words; + (c)->bytes = n_words*sizeof(W_); // Use when changing a closure from one kind to another #define OVERWRITE_INFO(c, new_info) \ @@ -280,8 +280,11 @@ INLINE_HEADER StgOffset ap_sizeW( StgAP* x ) INLINE_HEADER StgOffset pap_sizeW( StgPAP* x ) { return PAP_sizeW(x->n_args); } +INLINE_HEADER StgWord arr_words_words( StgArrWords* x) +{ return ROUNDUP_BYTES_TO_WDS(x->bytes); } + INLINE_HEADER StgOffset arr_words_sizeW( StgArrWords* x ) -{ return sizeofW(StgArrWords) + x->words; } +{ return sizeofW(StgArrWords) + arr_words_words(x); } INLINE_HEADER StgOffset mut_arr_ptrs_sizeW( StgMutArrPtrs* x ) { return sizeofW(StgMutArrPtrs) + x->size; }