Handbook
Glossary
visit-edge ( from to -- )
Vocabulary
compiler
.
cfg
.
stacks
.
finalize
Inputs
from
a
basic-block
to
a
basic-block
Outputs
None
Word description
If required, insert a block containing
##peek
and
##replace
instructions on the edge between the 'from' and 'to' block. If no such instructions are needed, then no block is inserted.
Definition
USING:
compiler.cfg.instructions
compiler.cfg.utilities
kernel
make
math
sequences
;
IN:
compiler.cfg.stacks.finalize
:
visit-edge
( from to -- )
2dup
[
[
insert-replaces
]
[
insert-peeks
]
2bi
##branch,
]
V{
}
make
dup
length
1
>
[
insert-basic-block
]
[
3drop
]
if
;