Handbook
Glossary
add-range ( from to ranges -- )
Vocabulary
compiler
.
cfg
.
linear-scan
.
ranges
Inputs
from
an
integer
to
an
integer
ranges
a
sequence
Outputs
None
Word description
Adds the given range to the 'ranges' sequence, or extends the last range of it if it is possible.
Definition
USING:
arrays
kernel
sequences
;
IN:
compiler.cfg.linear-scan.ranges
:
add-range
( from to ranges -- )
[
extend-last?
]
2check
[
[
nip
last
second
2array
]
keep
set-last
]
[
add-new-range
]
if
;