Remove identities on / and rem, which were no-ops because integer-derived-ops would return an empty array
parent
97fa79d7fa
commit
b4588629ab
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue