[project @ 2003-01-10 16:33:49 by simonmar]
authorsimonmar <unknown>
Fri, 10 Jan 2003 16:33:50 +0000 (16:33 +0000)
committersimonmar <unknown>
Fri, 10 Jan 2003 16:33:50 +0000 (16:33 +0000)
commitc3fb6ff19bae7b0f0f0368244ca1a386b7f57ca6
tree3ea630b891704cd711360b94538429faf169e5ea
parent2d6705ca56516c75c2f18c811f38c6ba7be02329
[project @ 2003-01-10 16:33:49 by simonmar]
Changes to the way stack checks are handled in GHCi, to fix a rare bug
when a stack check fails in a BCO.

We now aggregate all stack use from case alternatives up to the
enclosing function/thunk BCO, and do a single stack check at the
beginning of that BCO.  This simplifies the stack check failure code,
because it doesn't have to cope with the case when a case alternative
needs to restart.

We still employ the trick of doing a fixed stack check before every
BCO, only inserting an actual stack check instruction in the BCO if it
needs more stack than this fixed amount.  The fixed stack check is now
only done before running a function/thunk BCO.
ghc/compiler/ghci/ByteCodeGen.lhs
ghc/compiler/ghci/ByteCodeInstr.lhs
ghc/rts/Interpreter.c