Handbook
Glossary
compute-phi-equiv ( inputs outputs -- )
Vocabulary
compiler
.
tree
.
propagation
.
copy
Inputs
inputs
a
sequence
outputs
a
sequence
Outputs
None
Word description
An output is a copy of every input if all inputs are copies of the same original value.
Definition
USING:
assocs
grouping
kernel
namespaces
sequences
stack-checker.branches
;
IN:
compiler.tree.propagation.copy
:
compute-phi-equiv
( inputs outputs -- )
copies
get
[
[
first
swap
]
]
dip
[
set-at
]
curry
compose
[
[
swap
remove-bottom
resolve-copies
dup
[
f
]
[
all-equal?
]
if-empty
]
]
dip
[
[
2drop
]
if
]
curry
compose
2each
;