X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fghci%2FByteCodeInstr.lhs;h=ffd7c71937f8d3f39bcfd5ca9590f55536c29f32;hb=17b297d97d327620ed6bfab942f8992b2446f1bf;hp=fee17bccb51c9d7f4603f8ac9e24e1f703567741;hpb=86bec4298d582ef1d8f0a201d6a81145e1be9498;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeInstr.lhs b/compiler/ghci/ByteCodeInstr.lhs index fee17bc..ffd7c71 100644 --- a/compiler/ghci/ByteCodeInstr.lhs +++ b/compiler/ghci/ByteCodeInstr.lhs @@ -4,6 +4,15 @@ ByteCodeInstrs: Bytecode instruction definitions \begin{code} +{-# OPTIONS_GHC -funbox-strict-fields #-} + +{-# OPTIONS_GHC -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings +-- for details + module ByteCodeInstr ( BCInstr(..), ProtoBCO(..), bciStackUse, BreakInfo (..) ) where @@ -55,9 +64,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 +104,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