multiplies by powers of two

Stephen Weeks MLton@sourcelight.com
Wed, 11 Jul 2001 16:38:32 -0700


> I guess it depends what Steve is rewriting.  I doubt you mean
> "-detect-overflow false on the basis library code" means that that all
> integer ops used in the basis library become non-detecting.  But, I guess
> I could see that rewriting the Array.* functions to use non-detecting +1's
> for the loops would be o.k., since the length must be < Int.maxInt.

I am going through the entire basis library and looking at every call to
Int.{+,-,*,~} to see if it can be replaced with a non-detecting one.  So far,
almost all can be.  That includes counters in array loops.

In the process, I have already found a bunch of bugs where we raise Overflow
instead of the correct exception (like Size, Subscript, ...).