yet another limit check bug
   
    Stephen Weeks
     
    MLton@sourcelight.com
       
    Wed, 24 Oct 2001 11:32:03 -0700
    
    
  
I decided to try out the new contification on what used to be a
problematic example, like:
----------------------------------------
fun f n = if n = 0 then () else g (n - 1)
and g n = if n = 0 then () else f (n - 1)
val _ =
   if 0w0 = MLton.Random.rand ()
      then f 10
   else g 10
----------------------------------------
It did the right thing, and contified f and g within main.
Unfortunately, this also brings out another bug regarding the loop
limit checks required for signal handling (even with the
-limit-check-per-block true).  Loop limit checks are currently
inserted at nodes that have an incoming edge from a node that they
dominate.  Unfortunately, in the control-flow graph for the above
program, there is no such node in the f-g loop.  We probably need to
do something using loopForests to ensure that all the loop headers get
a loop limit check.