compiler.tree.modular-arithmetic: revert strict patch so we can investigate further.
parent
e137cde7f8
commit
ec8377e125
|
@ -21,12 +21,10 @@ IN: compiler.tree.modular-arithmetic.tests
|
||||||
|
|
||||||
TUPLE: declared-fixnum { x fixnum } ;
|
TUPLE: declared-fixnum { x fixnum } ;
|
||||||
|
|
||||||
! XXX: As of .97, we do a bounds check and throw an error on overflow, so we can't
|
[ t ] [
|
||||||
! use fixnum+ here. If this is too big a regression, we can revert it.
|
[ { declared-fixnum } declare [ 1 + ] change-x ]
|
||||||
! [ t ] [
|
{ + fixnum+ >fixnum } inlined?
|
||||||
! [ { declared-fixnum } declare [ 1 + ] change-x ]
|
] unit-test
|
||||||
! { + fixnum+ >fixnum } inlined?
|
|
||||||
! ] unit-test
|
|
||||||
|
|
||||||
[ t ] [
|
[ t ] [
|
||||||
[ { declared-fixnum } declare x>> drop ]
|
[ { declared-fixnum } declare x>> drop ]
|
||||||
|
|
|
@ -39,7 +39,9 @@ IN: compiler.tree.modular-arithmetic
|
||||||
! is a modular arithmetic word, then the input can be converted into
|
! is a modular arithmetic word, then the input can be converted into
|
||||||
! a form that is cheaper to compute.
|
! 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
|
float>fixnum
|
||||||
set-alien-unsigned-1 set-alien-signed-1
|
set-alien-unsigned-1 set-alien-signed-1
|
||||||
set-alien-unsigned-2 set-alien-signed-2
|
set-alien-unsigned-2 set-alien-signed-2
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
USING: accessors effects eval kernel layouts math namespaces
|
USING: accessors effects eval kernel layouts math namespaces
|
||||||
quotations tools.test typed words words.symbol combinators.short-circuit
|
quotations tools.test typed words words.symbol combinators.short-circuit
|
||||||
compiler.tree.debugger prettyprint definitions compiler.units sequences
|
compiler.tree.debugger prettyprint definitions compiler.units sequences
|
||||||
classes.intersection strings classes.union ;
|
classes.intersection strings classes.union kernel.private ;
|
||||||
IN: typed.tests
|
IN: typed.tests
|
||||||
|
|
||||||
TYPED: f+ ( a: float b: float -- c: float )
|
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 )
|
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 neg 1 - 1quotation
|
[ most-positive-fixnum 1 fix+ ] unit-test
|
||||||
! [ 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
|
|
||||||
|
|
||||||
TUPLE: tweedle-dee ; final
|
TUPLE: tweedle-dee ; final
|
||||||
TUPLE: tweedle-dum ; final
|
TUPLE: tweedle-dum ; final
|
||||||
|
|
Loading…
Reference in New Issue