Improve typechecking of instance defaults
[ghc.git] / includes / Cmm.h
index 802ab51..3b9a5a6 100644 (file)
          (TO_W_( %INFO_TYPE(%STD_INFO(info)) )) {       \
   case                                                  \
     IND,                                                \
-    IND_PERM,                                           \
     IND_STATIC:                                         \
    {                                                    \
       x = StgInd_indirectee(x);                         \
 #include "DerivedConstants.h"
 #include "rts/storage/ClosureTypes.h"
 #include "rts/storage/FunTypes.h"
-#include "rts/storage/SMPClosureOps.h"
 #include "rts/OSThreads.h"
 
 /*
    -------------------------------------------------------------------------- */
 
 /* 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
         src_p = (src) + SIZEOF_StgMutArrPtrs + WDS(src_off);      \
         bytes = WDS(n);                                           \
                                                                   \
-        prim %memcpy(dst_p, src_p, bytes, WDS(1));                \
+        prim %memcpy(dst_p, src_p, bytes, SIZEOF_W);              \
                                                                   \
         dst_cards_p = dst_elems_p + WDS(StgMutArrPtrs_ptrs(dst)); \
         setCards(dst_cards_p, dst_off, n);                        \
         bytes = WDS(n);                                           \
                                                                   \
         if ((src) == (dst)) {                                     \
-            prim %memmove(dst_p, src_p, bytes, WDS(1));           \
+            prim %memmove(dst_p, src_p, bytes, SIZEOF_W);         \
         } else {                                                  \
-            prim %memcpy(dst_p, src_p, bytes, WDS(1));            \
+            prim %memcpy(dst_p, src_p, bytes, SIZEOF_W);          \
         }                                                         \
                                                                   \
         dst_cards_p = dst_elems_p + WDS(StgMutArrPtrs_ptrs(dst)); \