Handbook
Glossary
convert-tail-call ( ..a bb quot: ( ..a insn -- ..a tail-insn ) -- ..b )
Vocabulary
compiler
.
cfg
.
tco
Inputs
bb
an
object
quot
a
quotation
with stack effect
( ..a insn -- ..a tail-insn )
Outputs
None
Definition
USING:
accessors
compiler.cfg.instructions
kernel
sequences
;
IN:
compiler.cfg.tco
:
convert-tail-call
( ..a bb quot: ( ..a insn -- ..a tail-insn ) -- ..b )
[
dip
push
]
curry
[
[
instructions>>
[
pop*
]
[
pop
]
[
]
tri
[
[
##safepoint
new-insn
]
dip
push
]
[
[
##epilogue
new-insn
]
dip
push
]
]
]
dip
[
tri
]
curry
compose
[
successors>>
delete-all
]
bi
;
inline