Commit 69164b87 authored by simonmar's avatar simonmar
Browse files

[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.
parent e59ac28b
......@@ -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,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment