X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeInstr.lhs;h=2393f21f8eb888b6899eaf1a01b9edbb0aafacc3;hb=17f848e12faf8cf51aa58918522b6abe1e75dc51;hp=adb47c8ac44e58ed8bffaf24f03b49f598cbf12c;hpb=568e6b65ac52a2bcdb0450cc265f52080f78ab08;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeInstr.lhs b/compiler/ghci/ByteCodeInstr.lhs index adb47c8..2393f21 100644 --- a/compiler/ghci/ByteCodeInstr.lhs +++ b/compiler/ghci/ByteCodeInstr.lhs @@ -4,6 +4,7 @@ ByteCodeInstrs: Bytecode instruction definitions \begin{code} +{-# OPTIONS_GHC -funbox-strict-fields #-} module ByteCodeInstr ( BCInstr(..), ProtoBCO(..), bciStackUse, BreakInfo (..) ) where @@ -55,9 +56,9 @@ data BCInstr = STKCHECK Int -- Push locals (existing bits of the stack) - | PUSH_L Int{-offset-} - | PUSH_LL Int Int{-2 offsets-} - | PUSH_LLL Int Int Int{-3 offsets-} + | PUSH_L !Int{-offset-} + | PUSH_LL !Int !Int{-2 offsets-} + | PUSH_LLL !Int !Int !Int{-3 offsets-} -- Push a ptr (these all map to PUSH_G really) | PUSH_G Name @@ -95,12 +96,12 @@ data BCInstr | SLIDE Int{-this many-} Int{-down by this much-} -- To do with the heap - | ALLOC_AP Int -- make an AP with this many payload words - | ALLOC_PAP Int Int -- make a PAP with this arity / payload words - | MKAP Int{-ptr to AP is this far down stack-} Int{-# words-} - | MKPAP Int{-ptr to PAP is this far down stack-} Int{-# words-} - | UNPACK Int -- unpack N words from t.o.s Constr - | PACK DataCon Int + | ALLOC_AP !Int -- make an AP with this many payload words + | ALLOC_PAP !Int !Int -- make a PAP with this arity / payload words + | MKAP !Int{-ptr to AP is this far down stack-} !Int{-# words-} + | MKPAP !Int{-ptr to PAP is this far down stack-} !Int{-# words-} + | UNPACK !Int -- unpack N words from t.o.s Constr + | PACK DataCon !Int -- after assembly, the DataCon is an index into the -- itbl array -- For doing case trees @@ -140,7 +141,7 @@ data BCInstr data BreakInfo = BreakInfo { breakInfo_module :: Module - , breakInfo_number :: Int + , breakInfo_number :: {-# UNPACK #-} !Int , breakInfo_vars :: [(Id,Int)] , breakInfo_resty :: Type }