Handbook
Glossary
compute-modular-candidates* ( node -- )
Vocabulary
compiler
.
tree
.
modular-arithmetic
Inputs
node
an
object
Outputs
None
Definition
IN:
compiler.tree.modular-arithmetic
GENERIC:
compute-modular-candidates*
( node -- )
Methods
USING:
combinators
compiler.tree
compiler.tree.modular-arithmetic
kernel
;
M:
#call
compute-modular-candidates*
{
{
[
dup
modular-word?
]
[
output-candidate
]
}
{
[
dup
low-order-word?
]
[
input-candidiate
]
}
[
drop
]
}
cond
;
USING:
accessors
compiler.tree
compiler.tree.modular-arithmetic
kernel
math
sequences
;
M:
#push
compute-modular-candidates*
[
out-d>>
first
]
[
literal>>
]
bi
real?
[
[
modular-value
]
[
fixnum-value
]
bi
]
[
drop
]
if
;
USING:
compiler.tree
compiler.tree.modular-arithmetic
kernel
;
M:
node
compute-modular-candidates*
drop
;