[MLton-commit] r7084

Wesley Terpstra wesley at mlton.org
Thu Apr 16 11:39:50 PDT 2009


Exactly the same reasoning as the last commit. 
  limb_cnt = cnt / GMP_NUMB_BITS;

mpz/mul_2exp.c says
  limb_cnt = cnt / GMP_NUMB_BITS;
  wsize = abs_usize + limb_cnt + 1;
  if (w->_mp_alloc < wsize)
    _mpz_realloc (w, wsize);


----------------------------------------------------------------------

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:31:18 UTC (rev 7083)
+++ mlton/trunk/basis-library/integer/int-inf0.sml	2009-04-16 18:39:49 UTC (rev 7084)
@@ -1198,7 +1198,7 @@
             if shift = 0wx0
                then arg
                else Prim.<< (arg, shift, 
-                             reserve (S.+ (numLimbs arg, shiftSize shift), 1))
+                             reserve (S.+ (1, S.+ (numLimbs arg, shiftSize shift)), 1))
          fun bigRashift (arg: bigInt, shift: Word32.word): bigInt =
             if shift = 0wx0
                then arg




More information about the MLton-commit mailing list