summaryrefslogtreecommitdiff
path: root/compiler/ghci
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-10-09 12:39:14 -0400
committerBen Gamari <ben@smart-cactus.org>2018-10-09 12:40:23 -0400
commitd728c3c578cc9e9205def2c1e96934487b364b7b (patch)
treec542d0ea89dad09c0b8a887266375e4303f9a3a6 /compiler/ghci
parent4eeeb51d5f51083d0ae393009a7fd246223e9791 (diff)
downloadhaskell-d728c3c578cc9e9205def2c1e96934487b364b7b.tar.gz
Revert "Add Int8# and Word8#"
This unfortunately broke i386 support since it introduced references to byte-sized registers that don't exist on that architecture. Reverts binary submodule This reverts commit 5d5307f943d7581d7013ffe20af22233273fba06.
Diffstat (limited to 'compiler/ghci')
-rw-r--r--compiler/ghci/ByteCodeGen.hs17
1 files changed, 6 insertions, 11 deletions
diff --git a/compiler/ghci/ByteCodeGen.hs b/compiler/ghci/ByteCodeGen.hs
index e673cfed0a..022fe89306 100644
--- a/compiler/ghci/ByteCodeGen.hs
+++ b/compiler/ghci/ByteCodeGen.hs
@@ -805,7 +805,7 @@ mkConAppCode orig_d _ p con args_r_to_l =
do_pushery !d (arg : args) = do
(push, arg_bytes) <- case arg of
- (Padding l _) -> return $! pushPadding l
+ (Padding l _) -> pushPadding l
(FieldOff a _) -> pushConstrAtom d p (fromNonVoid a)
more_push_code <- do_pushery (d + arg_bytes) args
return (push `appOL` more_push_code)
@@ -1569,16 +1569,11 @@ pushConstrAtom d p (AnnVar v)
pushConstrAtom d p expr = pushAtom d p expr
-pushPadding :: Int -> (BCInstrList, ByteOff)
-pushPadding !n = go n (nilOL, 0)
- where
- go n acc@(!instrs, !off) = case n of
- 0 -> acc
- 1 -> (instrs `mappend` unitOL PUSH_PAD8, off + 1)
- 2 -> (instrs `mappend` unitOL PUSH_PAD16, off + 2)
- 3 -> go 1 (go 2 acc)
- 4 -> (instrs `mappend` unitOL PUSH_PAD32, off + 4)
- _ -> go (n - 4) (go 4 acc)
+pushPadding :: Int -> BcM (BCInstrList, ByteOff)
+pushPadding 1 = return (unitOL (PUSH_PAD8), 1)
+pushPadding 2 = return (unitOL (PUSH_PAD16), 2)
+pushPadding 4 = return (unitOL (PUSH_PAD32), 4)
+pushPadding x = panic $ "pushPadding x=" ++ show x
-- -----------------------------------------------------------------------------
-- Given a bunch of alts code and their discrs, do the donkey work