fib, new primitives, and useless analysis

Matthew Fluet fluet@research.nj.nec.com
Wed, 21 Jun 2000 17:43:24 -0400 (EDT)



On Wed, 21 Jun 2000, Stephen Weeks wrote:

> 
> > WRONG!!!!  What about overflow exceptions.  I realize that they aren't
> > being done now, and perhaps that is why it does this, but in general you
> > really have to do the add to make sure that the exception happens at the
> > right time.
> 
> But MLton doesn't do overflow exceptions for Int.+, Int.*, Int.-.
> Given this, isn't the optimization semantics preserving?
> 

In general, though, I think that optimization needs some tweaking.  It's
coming about because there is an implicit assumption that Prim's do not
side-effect. (true?) We can continue the debate about whether or not Int.+
should or should not raise Overflow, but certainly FFI's should be
considered side-effecting.