projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Windows build fix
[ghc-hetmet.git]
/
compiler
/
ghci
/
ByteCodeGen.lhs
diff --git
a/compiler/ghci/ByteCodeGen.lhs
b/compiler/ghci/ByteCodeGen.lhs
index
8a4b5e2
..
947382e
100644
(file)
--- a/
compiler/ghci/ByteCodeGen.lhs
+++ b/
compiler/ghci/ByteCodeGen.lhs
@@
-438,7
+438,7
@@
schemeE d s p (AnnLet binds (_,body))
compile_bind d' fvs x rhs size arity off = do
bco <- schemeR fvs (x,rhs)
compile_bind d' fvs x rhs size arity off = do
bco <- schemeR fvs (x,rhs)
- build_thunk (fromIntegral d') fvs size bco off arity
+ build_thunk d' fvs size bco off arity
compile_binds =
[ compile_bind d' fvs x rhs size arity n
compile_binds =
[ compile_bind d' fvs x rhs size arity n
@@
-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
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
mkFastString (unpackFS target ++ '@':show size)
#endif
| otherwise
@@
-1203,7
+1203,7
@@
pushAtom d p (AnnVar v)
= return (unitOL (PUSH_PRIMOP primop), 1)
| Just d_v <- lookupBCEnv_maybe p v -- v is a local variable
= return (unitOL (PUSH_PRIMOP primop), 1)
| Just d_v <- lookupBCEnv_maybe p v -- v is a local variable
- = let l = d - fromIntegral d_v + sz - 2
+ = let l = d - d_v + sz - 2
in return (toOL (genericReplicate sz (PUSH_L l)), sz)
-- d - d_v the number of words between the TOS
-- and the 1st slot of the object
in return (toOL (genericReplicate sz (PUSH_L l)), sz)
-- d - d_v the number of words between the TOS
-- and the 1st slot of the object
@@
-1534,7
+1534,10
@@
recordItblMallocBc a
getLabelBc :: BcM Word16
getLabelBc
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
getLabelsBc :: Word16 -> BcM [Word16]
getLabelsBc n