Skip to content
  • Jan Stolarek's avatar
    Loopification jump between stack and heap checks · ea584ab6
    Jan Stolarek authored
    Fixes #8585
    
    When emmiting label of a self-recursive tail call (ie. when
    performing loopification optimization) we emit the loop header
    label after a stack check but before the heap check. The reason is
    that tail-recursive functions use constant amount of stack space
    so we don't need to repeat the check in every loop. But they can
    grow the heap so heap check must be repeated in every call.
    See Note [Self-recursive tail calls] and [Self-recursive loop header].
    ea584ab6