X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FByteCodeInstr.lhs;h=58e8eda8d5841192d934ccb5375e3163ec7d2252;hp=7a965a14baa7a2d55492eda5c18ef814db3922bf;hb=2cc5b907318f97e19b28b2ad8ed9ff8c1f401dcc;hpb=239e9471e104fd88ec93bf42623c3a68a496657a diff --git a/ghc/compiler/ghci/ByteCodeInstr.lhs b/ghc/compiler/ghci/ByteCodeInstr.lhs index 7a965a1..58e8eda 100644 --- a/ghc/compiler/ghci/ByteCodeInstr.lhs +++ b/ghc/compiler/ghci/ByteCodeInstr.lhs @@ -19,8 +19,7 @@ import PrimRep ( PrimRep ) import DataCon ( DataCon ) import VarSet ( VarSet ) import PrimOp ( PrimOp ) -import Foreign ( Addr ) - +import Ptr \end{code} %************************************************************************ @@ -37,7 +36,7 @@ data ProtoBCO a -- what the BCO came from (Either [AnnAlt Id VarSet] (AnnExpr Id VarSet)) - [Addr] -- malloc'd; free when BCO is GCd + [Ptr ()] -- malloc'd; free when BCO is GCd nameOfProtoBCO (ProtoBCO nm insns origin malloced) = nm @@ -57,7 +56,7 @@ data BCInstr | PUSH_AS Name PrimRep -- push alts and BCO_ptr_ret_info -- PrimRep so we know which itbl -- Pushing literals - | PUSH_UBX (Either Literal Addr) + | PUSH_UBX (Either Literal (Ptr ())) Int -- push this int/float/double/addr, NO TAG, on the stack -- Int is # of words to copy from literal pool -- Eitherness reflects the difficulty of dealing with @@ -100,7 +99,7 @@ data BCInstr | JMP LocalLabel -- For doing calls to C (via glue code generated by ByteCodeFFI) - | CCALL Addr -- of the glue code + | CCALL (Ptr ()) -- of the glue code | SWIZZLE Int Int -- to the ptr N words down the stack, -- add M (interpreted as a signed 16-bit entity)