val _ = () and exception optimization in MLton

Stephen Weeks sweeks@intertrust.com
Thu, 10 Aug 2000 12:57:08 -0700 (PDT)


> Given the way that exception handling is cascaded, does the
> analysis in the IL simply involve observing if the function
> can execute a Raise?

No.  It is basically the closure of whether the function can, with its local
handler stack empty, execute a raise or call another function that can raise.

> Otherwise, I don't see how you'd be
> tell if an exception is handled by a function's caller, or
> its caller's caller.

It doesn't compute who handles the exception.  It only computes who can raise.