Handbook
Glossary
intersect-range ( r1 r2 -- n/f )
Vocabulary
compiler
.
cfg
.
linear-scan
.
ranges
Inputs
r1
a
pair
r2
a
pair
Outputs
n/f
number
or
f
Word description
First index for the ranges intersection, or f if they don't intersect.
Definition
USING:
kernel
math
sequences
;
IN:
compiler.cfg.linear-scan.ranges
:
intersect-range
( r1 r2 -- n/f )
[
[
first
]
bi@
>
]
2check
[
swap
]
when
[
[
second
]
[
first
]
bi*
>=
]
2check
[
nip
first
]
[
2drop
f
]
if
;