Remove the lock around NameCache for readBinIface.
[ghc-hetmet.git] / compiler / ghci / ByteCodeGen.lhs
index 4ec8043..947382e 100644 (file)
@@ -1034,7 +1034,7 @@ generateCCall d0 s p (CCallSpec target cconv _) fn args_r_to_l
                       stdcall_adj_target
 #ifdef mingw32_TARGET_OS
                           | StdCallConv <- cconv
-                          = let size = a_reps_sizeW * wORD_SIZE in
+                          = let size = fromIntegral a_reps_sizeW * wORD_SIZE in
                             mkFastString (unpackFS target ++ '@':show size)
 #endif
                           | otherwise
@@ -1534,7 +1534,10 @@ recordItblMallocBc a
 
 getLabelBc :: BcM Word16
 getLabelBc
-  = BcM $ \st -> return (st{nextlabel = 1 + nextlabel st}, nextlabel st)
+  = BcM $ \st -> do let nl = nextlabel st
+                    when (nl == maxBound) $
+                        panic "getLabelBc: Ran out of labels"
+                    return (st{nextlabel = nl + 1}, nl)
 
 getLabelsBc :: Word16 -> BcM [Word16]
 getLabelsBc n