Loopification should omit stack check
|Reported by:||jstolarek||Owned by:||jstolarek|
|Type of failure:||Runtime performance bug||Difficulty:||Unknown|
|Test Case:||Blocked By:|
When we optimize a self-recursive tail call using loopification we don't need to perform a stack check in every loop. This is because a tail recursive function uses constant amount of stack. We should therefore place the loop header after the stack check, but before the heap check (because heap may grow in every call).
parcs proposed a patch here. We just need to make sure why it works and add some documentation.