diff options
author | Simon Marlow <marlowsd@gmail.com> | 2013-01-09 11:51:58 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-01-09 12:11:26 +0000 |
commit | 0c42e301337bdefa94d0c288bb6d689ac33baa4d (patch) | |
tree | 6d91d9dab0d7ae40e04f641d76937db438d89a55 /compiler/ghci | |
parent | f838d2f3d4ee8876647f190da3b2c858c6a669d4 (diff) | |
download | haskell-0c42e301337bdefa94d0c288bb6d689ac33baa4d.tar.gz |
remove unnecessary size field in BCO (#7518)
Diffstat (limited to 'compiler/ghci')
-rw-r--r-- | compiler/ghci/ByteCodeAsm.lhs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs index 17b30424c6..9631add3a9 100644 --- a/compiler/ghci/ByteCodeAsm.lhs +++ b/compiler/ghci/ByteCodeAsm.lhs @@ -129,10 +129,7 @@ assembleBCO dflags (ProtoBCO nm instrs bitmap bsize arity _origin _malloced) = d -- pass 1: collect up the offsets of the local labels. let asm = mapM_ (assembleI dflags) instrs - -- Remember that the first insn starts at offset - -- sizeOf Word / sizeOf Word16 - -- since offset 0 (eventually) will hold the total # of insns. - initial_offset = largeArg16s dflags + initial_offset = 0 -- Jump instructions are variable-sized, there are long and short variants -- depending on the magnitude of the offset. However, we can't tell what @@ -153,8 +150,7 @@ assembleBCO dflags (ProtoBCO nm instrs bitmap bsize arity _origin _malloced) = d (Map.lookup lbl lbl_map) -- pass 2: run assembler and generate instructions, literals and pointers - let initial_insns = addListToSS emptySS $ largeArg dflags n_insns - let initial_state = (initial_insns, emptySS, emptySS) + let initial_state = (emptySS, emptySS, emptySS) (final_insns, final_lits, final_ptrs) <- execState initial_state $ runAsm dflags long_jumps env asm -- precomputed size should be equal to final size |