Handbook
Glossary
register-free-windows ( interval reg -- windows )
Vocabulary
compiler
.
cfg
.
register-allocation
.
greedy
Inputs
interval
an
object
reg
an
object
Outputs
windows
an
object
Definition
USING:
accessors
arrays
compiler.cfg.linear-scan.live-intervals
kernel
math
math.order
sequences
;
IN:
compiler.cfg.register-allocation.greedy
::
register-free-windows
( interval reg -- windows )
interval
live-interval-start
:>
cursor! interval
live-interval-end
1
+
:>
end
V{
}
clone
:>
windows interval reg
register-index
entries>>
[|
entry |
entry
second
cursor
>=
entry
first
end
<=
and
[
entry
first
cursor
>
[
cursor entry
first
1
-
2array
windows
push
]
when
cursor entry
second
1
+
max
cursor!
]
when
]
each
cursor end
<=
[
cursor end
2array
windows
push
]
when
windows
;