[project @ 2004-08-17 15:23:47 by simonpj]
[ghc-hetmet.git] / ghc / compiler / ghci / ByteCodeInstr.lhs
index 0d812e4..43c5515 100644 (file)
@@ -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
@@ -133,7 +124,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