From 69164b870a57e9f7bd6f4eb3d257c8c3e80fcb0f Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 19 May 2003 11:37:07 +0000 Subject: [PATCH] [project @ 2003-05-19 11:37:07 by simonmar] Fix a pair of off-by-one errors that meant that BCOs were normally two words larger than they needed to be. --- ghc/compiler/ghci/ByteCodeAsm.lhs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/ghci/ByteCodeAsm.lhs b/ghc/compiler/ghci/ByteCodeAsm.lhs index d1a737a..f067840 100644 --- a/ghc/compiler/ghci/ByteCodeAsm.lhs +++ b/ghc/compiler/ghci/ByteCodeAsm.lhs @@ -172,11 +172,11 @@ assembleBCO (ProtoBCO nm instrs bitmap bsize arity origin malloced) mkBitmapArray :: Int -> [StgWord] -> UArray Int StgWord mkBitmapArray bsize bitmap - = listArray (0, 1 + length bitmap) (fromIntegral bsize : bitmap) + = listArray (0, length bitmap) (fromIntegral bsize : bitmap) mkInstrArray :: Int -> [Word16] -> UArray Int Word16 mkInstrArray n_insns asm_insns - = listArray (0, 1 + n_insns) (fromIntegral n_insns : asm_insns) + = listArray (0, n_insns) (fromIntegral n_insns : asm_insns) -- instrs nonptrs ptrs itbls type AsmState = (SizedSeq Word16, -- 1.7.10.4