Handbook
Glossary
two-color-component ( vertex first-color second-color graph colors -- component )
Vocabulary
compiler
.
cfg
.
register-allocation
.
chordal
Inputs
vertex
an
object
first-color
an
object
second-color
an
object
graph
an
object
colors
an
object
Outputs
component
an
object
Definition
USING:
assocs
compiler.utilities
kernel
sequences
;
IN:
compiler.cfg.register-allocation.chordal
::
two-color-component
( vertex first-color second-color graph colors -- component )
H{
}
clone
:>
component
V{
vertex
}
clone
:>
pending
[
pending
empty?
not
]
[
pending
pop
:>
current current component
key?
[
]
[
current component
conjoin
current graph
at
[|
neighbor |
neighbor colors
at
:>
color color first-color
=
color second-color
=
or
[
neighbor component
key?
[
]
[
neighbor pending
push
]
if
]
when
]
each
]
if
]
while
component
;