Remove identities on / and rem, which were no-ops because integer-derived-ops would return an empty array

db4
Slava Pestov 2011-10-09 13:51:03 -07:00
parent 97fa79d7fa
commit b4588629ab
1 changed files with 1 additions and 9 deletions

View File

@ -8,7 +8,7 @@ compiler.tree.propagation.info ;
IN: compiler.tree.identities
: define-identities ( word identities -- )
[ integer-derived-ops ] dip
[ integer-derived-ops dup empty? f assert= ] dip
'[ _ "identities" set-word-prop ] each ;
SYMBOL: X
@ -29,18 +29,10 @@ SYMBOL: X
{ { 0 X } drop }
} define-identities
\ / {
{ { X 1 } drop }
} define-identities
\ mod {
{ { X 1 } 0 }
} define-identities
\ rem {
{ { X 1 } 0 }
} define-identities
\ bitand {
{ { X -1 } drop }
{ { -1 X } nip }