compiler.tree.identities: the identity on mod was useless too, because we already have a rewrite rule which handles this case in compiler.tree.propagation
parent
b5fc65707d
commit
7bc38641f9
|
@ -29,10 +29,6 @@ SYMBOL: X
|
|||
{ { 0 X } drop }
|
||||
} define-identities
|
||||
|
||||
\ mod {
|
||||
{ { X 1 } 0 }
|
||||
} define-identities
|
||||
|
||||
\ bitand {
|
||||
{ { X -1 } drop }
|
||||
{ { -1 X } nip }
|
||||
|
|
|
@ -134,6 +134,12 @@ TUPLE: declared-fixnum { x fixnum } ;
|
|||
] { mod fixnum-mod rem } inlined?
|
||||
] unit-test
|
||||
|
||||
[ [ drop 0 ] ]
|
||||
[ [ >integer 1 rem ] test-modular-arithmetic ] unit-test
|
||||
|
||||
[ [ drop 0 ] ]
|
||||
[ [ >integer 1 mod ] test-modular-arithmetic ] unit-test
|
||||
|
||||
[ [ >fixnum 255 >R R> fixnum-bitand ] ]
|
||||
[ [ >integer 256 rem ] test-modular-arithmetic ] unit-test
|
||||
|
||||
|
|
Loading…
Reference in New Issue