[MLton-commit] r7085
Wesley Terpstra
wesley at mlton.org
Thu Apr 16 11:49:39 PDT 2009
A better understanding of the 2nd argument of reserve lets this be simplified.
----------------------------------------------------------------------
U mlton/trunk/basis-library/integer/int-inf0.sml
----------------------------------------------------------------------
Modified: mlton/trunk/basis-library/integer/int-inf0.sml
===================================================================
--- mlton/trunk/basis-library/integer/int-inf0.sml 2009-04-16 18:39:49 UTC (rev 7084)
+++ mlton/trunk/basis-library/integer/int-inf0.sml 2009-04-16 18:49:37 UTC (rev 7085)
@@ -1198,12 +1198,12 @@
if shift = 0wx0
then arg
else Prim.<< (arg, shift,
- reserve (S.+ (1, S.+ (numLimbs arg, shiftSize shift)), 1))
+ reserve (S.+ (numLimbs arg, shiftSize shift), 1))
fun bigRashift (arg: bigInt, shift: Word32.word): bigInt =
if shift = 0wx0
then arg
else Prim.~>> (arg, shift,
- reserve (S.+ (1, S.max (0, S.- (numLimbs arg, shiftSize shift))), 0))
+ reserve (S.max (0, S.- (numLimbs arg, shiftSize shift)), 1))
end
fun mkBigCvt {base: Int32.int,
More information about the MLton-commit
mailing list