[project @ 2001-10-03 09:56:18 by sewardj]
authorsewardj <unknown>
Wed, 3 Oct 2001 09:56:18 +0000 (09:56 +0000)
committersewardj <unknown>
Wed, 3 Oct 2001 09:56:18 +0000 (09:56 +0000)
In the interactive FFI, handle f-i'd fns which return char.

ghc/compiler/ghci/ByteCodeFFI.lhs
ghc/compiler/ghci/ByteCodeGen.lhs

index bcfee9d..89f212b 100644 (file)
@@ -257,6 +257,7 @@ mkMarshalCode_wrk cconv (r_offW, r_rep) addr_offW arg_offs_n_reps
            fstps       4(%esi)
      -}
      ++ case r_rep of
+           CharRep   -> movl_eax_offesimem 4
            IntRep    -> movl_eax_offesimem 4
            WordRep   -> movl_eax_offesimem 4
            AddrRep   -> movl_eax_offesimem 4
@@ -455,6 +456,7 @@ mkMarshalCode_wrk cconv (r_offW, r_rep) addr_offW arg_offs_n_reps
             f64 = [mkSTF f0 i0 4, mkSTF f1 i0 8]
         in
             case r_rep of
+               CharRep   -> i32
                IntRep    -> i32
                WordRep   -> i32
                AddrRep   -> i32
index f1fe8dd..170a85c 100644 (file)
@@ -838,6 +838,7 @@ generateCCall d0 s p ccall_spec@(CCallSpec target cconv safety) fn args_r_to_l
 mkDummyLiteral :: PrimRep -> Literal
 mkDummyLiteral pr
    = case pr of
+        CharRep   -> MachChar 0
         IntRep    -> MachInt 0
         DoubleRep -> MachDouble 0
         FloatRep  -> MachFloat 0