Handbook
Glossary
delete-conditional? ( bb -- ? )
Vocabulary
compiler
.
cfg
.
useless-conditionals
Inputs
bb
an
object
Outputs
?
an
object
Definition
USING:
accessors
combinators.short-circuit
compiler.cfg.instructions
compiler.cfg.utilities
kernel
sequences
;
IN:
compiler.cfg.useless-conditionals
:
delete-conditional?
( bb -- ? )
{
[
instructions>>
last
{
[
##compare-branch?
]
[
##compare-imm-branch?
]
[
##compare-integer-branch?
]
[
##compare-integer-imm-branch?
]
[
##compare-float-ordered-branch?
]
[
##compare-float-unordered-branch?
]
}
1||
]
[
successors>>
first2
[
skip-empty-blocks
]
bi@
eq?
]
}
1&&
;