From e778ecfe0b524809155543e6d7fe16654cb038ee Mon Sep 17 00:00:00 2001 From: sewardj Date: Sun, 21 Jan 2001 16:37:22 +0000 Subject: [PATCH] [project @ 2001-01-21 16:37:22 by sewardj] Add support for Word#. --- ghc/compiler/ghci/ByteCodeGen.lhs | 3 ++- ghc/compiler/ghci/ByteCodeLink.lhs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/ghci/ByteCodeGen.lhs b/ghc/compiler/ghci/ByteCodeGen.lhs index 5b5cc23..14f0ed4 100644 --- a/ghc/compiler/ghci/ByteCodeGen.lhs +++ b/ghc/compiler/ghci/ByteCodeGen.lhs @@ -330,7 +330,7 @@ schemeE d s p (fvs, AnnCase scrut bndr alts) scrut_primrep = typePrimRep (idType bndr) isAlgCase = case scrut_primrep of - CharRep -> False ; AddrRep -> False + CharRep -> False ; AddrRep -> False ; WordRep -> False IntRep -> False ; FloatRep -> False ; DoubleRep -> False PtrRep -> True other -> pprPanic "ByteCodeGen.schemeE" (ppr other) @@ -621,6 +621,7 @@ pushAtom True d p (AnnLit lit) pushAtom False d p (AnnLit lit) = case lit of + MachWord w -> code WordRep MachInt i -> code IntRep MachFloat r -> code FloatRep MachDouble r -> code DoubleRep diff --git a/ghc/compiler/ghci/ByteCodeLink.lhs b/ghc/compiler/ghci/ByteCodeLink.lhs index 0bb6906..2792b3d 100644 --- a/ghc/compiler/ghci/ByteCodeLink.lhs +++ b/ghc/compiler/ghci/ByteCodeLink.lhs @@ -271,6 +271,7 @@ mkBits findLabel st proto_insns = do st_I1 <- addToSS st_I0 (getName dcon) return (sizeSS st_I0, (st_i0,st_l0,st_p0,st_I1)) + literal st (MachWord w) = int st (fromIntegral w) literal st (MachInt j) = int st (fromIntegral j) literal st (MachFloat r) = float st (fromRational r) literal st (MachDouble r) = double st (fromRational r) @@ -281,6 +282,7 @@ mkBits findLabel st proto_insns where ret_itbl_addr = case pk of PtrRep -> stg_ctoi_ret_R1p_info + WordRep -> stg_ctoi_ret_R1n_info IntRep -> stg_ctoi_ret_R1n_info AddrRep -> stg_ctoi_ret_R1n_info CharRep -> stg_ctoi_ret_R1n_info -- 1.7.10.4