Handbook
Glossary
occupancy-conflicts ( ranges occupancy -- owners )
Vocabulary
compiler
.
cfg
.
register-allocation
.
occupancy
Inputs
ranges
an
object
occupancy
an
object
Outputs
owners
an
object
Definition
USING:
accessors
kernel
math
sequences
sorting
;
IN:
compiler.cfg.register-allocation.occupancy
::
occupancy-conflicts
( ranges occupancy -- owners )
occupancy
entries>>
:>
entries entries
empty?
[
{
}
]
[
V{
}
clone
:>
hits ranges
[|
range |
range
first
entries
occupancy-lower-bound
:>
i!
[
i entries
length
<
[
i entries
nth
first
range
second
<=
]
[
f
]
if
]
[
i entries
nth
:>
entry hits
[
third
entry
third
eq?
]
any?
[
entry hits
push
]
unless
i 1
+
i!
]
while
]
each
hits
[
fourth
]
sort-by
[
third
]
map
]
if
;