[MLton] cvs commit: improved exception history for Overflow
Matthew Fluet
fluet@cs.cornell.edu
Mon, 23 May 2005 11:45:33 -0400 (EDT)
> I ended up going for a two-piece solution that didn't require changing
> any ILs. The elaborator wraps an Enter/Leave around each raise
> expression, just as it does around each function body. The (still
> horribly misnamed) defunctorizer wraps an Enter/Leave around each
> raise {Bind,Match} that the match compiler generates. Fortunately, we
> already had the source position info there for the warnings generated
> by match compilation.
These extra Enter/Leave's should probably be predicated upon
Control.exnHistory, else they will add a lot of source positions to
-profile count.
Alternatively, if one thinks that counting raises would be of interest, we
could add -profile-raise {false|true} which is implicitly enabled by
-const 'Exn.keepHistory true' and then the elaborator/defunctorizer would
predicate upon Control.profileRaise.