[commit: ghc] master: Support large SLIDE instructions. (6dc22bf)
Paolo Capriotti
p.capriotti at gmail.com
Tue Apr 17 20:04:20 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/6dc22bfa9d0026c09abf94e44f04fb9e761d4e54
>---------------------------------------------------------------
commit 6dc22bfa9d0026c09abf94e44f04fb9e761d4e54
Author: Paolo Capriotti <p.capriotti at gmail.com>
Date: Thu Apr 5 09:52:18 2012 +0100
Support large SLIDE instructions.
The bytecode generator used to keep track of the stack depth with a
16-bit counter, which could overflow for very large BCOs, resulting in
incorrect bytecode.
This commit switches to a word-sized counter, and eagerly panics
whenever an operand is too big, instead of truncating the result.
This allows us to work around the 16-bit limitation in the case of SLIDE
instructions, since we can simply factor it into multiple SLIDEs with
smaller arguments.
compiler/ghci/ByteCodeGen.lhs | 110 ++++++++++++++++++++++++----------------
1 files changed, 66 insertions(+), 44 deletions(-)
Diff suppressed because of size. To see it, use:
git show 6dc22bfa9d0026c09abf94e44f04fb9e761d4e54
More information about the Cvs-ghc
mailing list