[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.
Showing with 37 additions and 26 deletions