Handbook
Glossary
(find-alternate-loop-head) ( bb -- bb' )
Vocabulary
compiler
.
cfg
.
linearization
.
private
Inputs
bb
an
object
Outputs
bb'
an
object
Definition
USING:
accessors
combinators.short-circuit
compiler.cfg.utilities
kernel
math
sequences
;
IN:
compiler.cfg.linearization.private
:
(find-alternate-loop-head)
( bb -- bb' )
dup
{
[
predecessor
visited?
not
]
[
predecessors>>
length
1
=
]
[
predecessor
successors>>
length
1
=
]
[
[
number>>
]
[
predecessor
number>>
]
bi
>
]
}
1&&
[
predecessor
(find-alternate-loop-head)
]
when
;