X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FByteCodeInstr.lhs;h=80788d6f395c56c7d35b41593dbb2096442e7906;hb=6a56f3ba02d33c38c95ff8f8da8a28d07f02ede9;hp=0d812e40c91904728ab121a6112a576200507b92;hpb=c3fb6ff19bae7b0f0f0368244ca1a386b7f57ca6;p=ghc-hetmet.git diff --git a/ghc/compiler/ghci/ByteCodeInstr.lhs b/ghc/compiler/ghci/ByteCodeInstr.lhs index 0d812e4..80788d6 100644 --- a/ghc/compiler/ghci/ByteCodeInstr.lhs +++ b/ghc/compiler/ghci/ByteCodeInstr.lhs @@ -5,11 +5,11 @@ \begin{code} module ByteCodeInstr ( - BCInstr(..), ProtoBCO(..), StgWord, bciStackUse + BCInstr(..), ProtoBCO(..), bciStackUse ) where #include "HsVersions.h" -#include "MachDeps.h" +#include "../includes/MachDeps.h" import Outputable import Name ( Name ) @@ -17,24 +17,15 @@ import Id ( Id ) import CoreSyn import PprCore ( pprCoreExpr, pprCoreAlt ) import Literal ( Literal ) -import PrimRep ( PrimRep ) import DataCon ( DataCon ) import VarSet ( VarSet ) import PrimOp ( PrimOp ) +import SMRep ( StgWord, CgRep ) import GHC.Ptr -import Data.Word - -- ---------------------------------------------------------------------------- -- Bytecode instructions --- The appropriate StgWord type for this platform (needed for bitmaps) -#if SIZEOF_HSWORD == 4 -type StgWord = Word32 -#else -type StgWord = Word64 -#endif - data ProtoBCO a = ProtoBCO { protoBCOName :: a, -- name, in some sense @@ -67,7 +58,7 @@ data BCInstr -- Push an alt continuation | PUSH_ALTS (ProtoBCO Name) - | PUSH_ALTS_UNLIFTED (ProtoBCO Name) PrimRep + | PUSH_ALTS_UNLIFTED (ProtoBCO Name) CgRep -- Pushing literals | PUSH_UBX (Either Literal (Ptr ())) Int @@ -92,7 +83,6 @@ data BCInstr | PUSH_APPLY_PPPP | PUSH_APPLY_PPPPP | PUSH_APPLY_PPPPPP - | PUSH_APPLY_PPPPPPP | SLIDE Int{-this many-} Int{-down by this much-} @@ -133,7 +123,7 @@ data BCInstr -- To Infinity And Beyond | ENTER | RETURN -- return a lifted value - | RETURN_UBX PrimRep -- return an unlifted value, here's its rep + | RETURN_UBX CgRep -- return an unlifted value, here's its rep -- ----------------------------------------------------------------------------- -- Printing bytecode instructions @@ -173,7 +163,6 @@ instance Outputable BCInstr where ppr PUSH_APPLY_PPPP = text "PUSH_APPLY_PPPP" ppr PUSH_APPLY_PPPPP = text "PUSH_APPLY_PPPPP" ppr PUSH_APPLY_PPPPPP = text "PUSH_APPLY_PPPPPP" - ppr PUSH_APPLY_PPPPPPP = text "PUSH_APPLY_PPPPPPP" ppr (SLIDE n d) = text "SLIDE " <+> int n <+> int d ppr (ALLOC_AP sz) = text "ALLOC_AP " <+> int sz @@ -237,7 +226,6 @@ bciStackUse PUSH_APPLY_PPP{} = 1 bciStackUse PUSH_APPLY_PPPP{} = 1 bciStackUse PUSH_APPLY_PPPPP{} = 1 bciStackUse PUSH_APPLY_PPPPPP{} = 1 -bciStackUse PUSH_APPLY_PPPPPPP{} = 1 bciStackUse ALLOC_AP{} = 1 bciStackUse ALLOC_PAP{} = 1 bciStackUse (UNPACK sz) = sz