nontail Bug continuations

Stephen Weeks MLton@sourcelight.com
Sat, 10 Nov 2001 21:00:02 -0800


> > I just fixed a weird bug caused by the interaction of removeUnused and
> > the shrinker.  RemoveUnused changes unreachable continuations into Bug
> > continuations.  
> 
> It's not that weird; or, rather, I kept meaning to mention that the
> shrinker should turn Bug continuations into tail calls because
> removeUnused would introduce them. ;)

Ahh.  Thinking a little more, I wonder if we should treat
continuations exactly as we treat handlers, and have a case for
expressing that we don't care what the continuation is.  That would
let us turn nontail calls to functions that we can prove never return
into tail calls with a don't care continuation.  Right now, we can
sometimes turn these into tail calls, but not always, if the types
don't match up.