summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-11-03 09:43:22 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-11-04 08:43:51 +0000
commitf699ccb4baef6ad3597451610cd78c3639236f3b (patch)
tree7fc357fc34409fae2763d0dd000ec3b353a8131b
parent3b54113ddb67e8b23865798b71bd0bed09b5bba9 (diff)
downloadhaskell-f699ccb4baef6ad3597451610cd78c3639236f3b.tar.gz
disable a debugging trace, and a little refactoring
-rw-r--r--compiler/ghci/ByteCodeAsm.lhs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs
index edd2e8a359..360dffed43 100644
--- a/compiler/ghci/ByteCodeAsm.lhs
+++ b/compiler/ghci/ByteCodeAsm.lhs
@@ -136,9 +136,6 @@ assembleBCO dflags (ProtoBCO nm instrs bitmap bsize arity _origin _malloced)
| otherwise = error "wORD_SIZE_IN_BITS not 32 or 64?"
label_env = mkLabelEnv Map.empty lableInitialOffset instrs
- n_instrs = length instrs :: Int
- max_w16s = fromIntegral n_instrs * maxInstr16s :: Word
-
-- Jump instructions are variable-sized, there are long and
-- short variants depending on the magnitude of the offset.
-- However, we can't tell what size instructions we will need
@@ -150,7 +147,8 @@ assembleBCO dflags (ProtoBCO nm instrs bitmap bsize arity _origin _malloced)
-- or short.
-- True => all our jumps will be long
- large_bco = if isLarge max_w16s then pprTrace "assembleBCO" (text "LARGE!") True else False
+ large_bco = isLarge max_w16s
+ where max_w16s = fromIntegral (length instrs) * maxInstr16s :: Word
mkLabelEnv :: Map Word16 Word -> Word -> [BCInstr]
-> Map Word16 Word