]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.tree.modular-arithmetic: revert strict patch so we can investigate further.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 8 Jul 2014 23:59:58 +0000 (16:59 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 8 Jul 2014 23:59:58 +0000 (16:59 -0700)
basis/compiler/tree/modular-arithmetic/modular-arithmetic-tests.factor
basis/compiler/tree/modular-arithmetic/modular-arithmetic.factor
basis/typed/typed-tests.factor

index 0e6161078a0e9002d28d5057ecff46882346e5dc..8b7c3a57f5fc44954ecb8bc445bc461b07ea99aa 100644 (file)
@@ -21,12 +21,10 @@ IN: compiler.tree.modular-arithmetic.tests
 
 TUPLE: declared-fixnum { x fixnum } ;
 
-! XXX: As of .97, we do a bounds check and throw an error on overflow, so we can't
-! use fixnum+ here. If this is too big a regression, we can revert it.
-! [ t ] [
-    ! [ { declared-fixnum } declare [ 1 + ] change-x ]
-    ! { + fixnum+ >fixnum } inlined?
-! ] unit-test
+[ t ] [
+    [ { declared-fixnum } declare [ 1 + ] change-x ]
+    { + fixnum+ >fixnum } inlined?
+] unit-test
 
 [ t ] [
     [ { declared-fixnum } declare x>> drop ]
index 135a63692dae56b96b5c89267509e1cb1bd1d034..2aafeebdd8d9129c739b2a013d2bbd9dc98a9cc9 100644 (file)
@@ -39,7 +39,9 @@ IN: compiler.tree.modular-arithmetic
 ! is a modular arithmetic word, then the input can be converted into
 ! a form that is cheaper to compute.
 {
-    >fixnum bignum>fixnum integer>fixnum
+    >fixnum
+    bignum>fixnum bignum>fixnum-strict
+    integer>fixnum integer>fixnum-strict
     float>fixnum
     set-alien-unsigned-1 set-alien-signed-1
     set-alien-unsigned-2 set-alien-signed-2
index 2c255e388cf0815b2f8b2ba71722b613651f667a..89347cbbb708fe3476394a63468dcd1640043ed7 100644 (file)
@@ -1,7 +1,7 @@
 USING: accessors effects eval kernel layouts math namespaces
 quotations tools.test typed words words.symbol combinators.short-circuit
 compiler.tree.debugger prettyprint definitions compiler.units sequences
-classes.intersection strings classes.union ;
+classes.intersection strings classes.union kernel.private ;
 IN: typed.tests
 
 TYPED: f+ ( a: float b: float -- c: float )
@@ -13,12 +13,8 @@ TYPED: f+ ( a: float b: float -- c: float )
 TYPED: fix+ ( a: fixnum b: fixnum -- c: fixnum )
     + ;
 
-! XXX: As of .97, we don't require that the output is a fixnum.
-! most-positive-fixnum neg 1 - 1quotation
-! [ most-positive-fixnum 1 fix+ ] unit-test
-
-! XXX: Check that we throw an error. This used to underflow to the least-positive-fixnum.
-[ most-positive-fixnum 1 fix+ ] [ { "kernel-error" 7 } head? ] must-fail-with
+most-positive-fixnum neg 1 - 1quotation
+[ most-positive-fixnum 1 fix+ ] unit-test
 
 TUPLE: tweedle-dee ; final
 TUPLE: tweedle-dum ; final