From: sewardj Date: Thu, 15 Feb 2001 14:30:35 +0000 (+0000) Subject: [project @ 2001-02-15 14:30:35 by sewardj] X-Git-Tag: Approximately_9120_patches~2617 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=45098d690dde0ee98a256ca05836384871b235c2;p=ghc-hetmet.git [project @ 2001-02-15 14:30:35 by sewardj] VoidRep call/return support for interpreted code. --- diff --git a/ghc/compiler/ghci/ByteCodeGen.lhs b/ghc/compiler/ghci/ByteCodeGen.lhs index c6aba19..cea9dbb 100644 --- a/ghc/compiler/ghci/ByteCodeGen.lhs +++ b/ghc/compiler/ghci/ByteCodeGen.lhs @@ -359,6 +359,7 @@ schemeE d s p (fvs, AnnCase scrut bndr alts) = case scrut_primrep of CharRep -> False ; AddrRep -> False ; WordRep -> False IntRep -> False ; FloatRep -> False ; DoubleRep -> False + VoidRep -> False ; PtrRep -> True other -> pprPanic "ByteCodeGen.schemeE" (ppr other) diff --git a/ghc/compiler/ghci/ByteCodeLink.lhs b/ghc/compiler/ghci/ByteCodeLink.lhs index dce5253..7000cbf 100644 --- a/ghc/compiler/ghci/ByteCodeLink.lhs +++ b/ghc/compiler/ghci/ByteCodeLink.lhs @@ -37,7 +37,7 @@ import MArray ( castSTUArray, newIntArray, writeIntArray, newAddrArray, writeAddrArray ) import Foreign ( Word16, Ptr(..) ) -import Addr ( Word, Addr ) +import Addr ( Word, Addr, nullAddr ) import PrelBase ( Int(..) ) import PrelGHC ( BCO#, newBCO#, unsafeCoerce#, @@ -297,6 +297,7 @@ mkBits findLabel st proto_insns CharRep -> stg_ctoi_ret_R1n_info FloatRep -> stg_ctoi_ret_F1_info DoubleRep -> stg_ctoi_ret_D1_info + VoidRep -> stg_ctoi_ret_V_info _ -> pprPanic "mkBits.ctoi_itbl" (ppr pk) itoc_itbl st pk @@ -307,11 +308,14 @@ mkBits findLabel st proto_insns IntRep -> stg_gc_unbx_r1_info FloatRep -> stg_gc_f1_info DoubleRep -> stg_gc_d1_info + VoidRep -> nullAddr + -- Interpreter.c spots this special case foreign label "stg_ctoi_ret_R1p_info" stg_ctoi_ret_R1p_info :: Addr foreign label "stg_ctoi_ret_R1n_info" stg_ctoi_ret_R1n_info :: Addr foreign label "stg_ctoi_ret_F1_info" stg_ctoi_ret_F1_info :: Addr foreign label "stg_ctoi_ret_D1_info" stg_ctoi_ret_D1_info :: Addr +foreign label "stg_ctoi_ret_V_info" stg_ctoi_ret_V_info :: Addr foreign label "stg_gc_unbx_r1_info" stg_gc_unbx_r1_info :: Addr foreign label "stg_gc_f1_info" stg_gc_f1_info :: Addr