: interval-to-spill ( active-intervals current -- live-interval )
#! We spill the interval with the most distant use location.
start>> '[ dup _ [ >= ] find-use nip ] { } map>assoc
- unclip-slice [ [ [ second ] bi@ > ] most ] reduce first ;
+ [ ] [ [ [ second ] bi@ > ] most ] map-reduce first ;
: assign-spill ( before after -- before after )
#! If it has been spilled already, reuse spill location.
: value-infos-union ( infos -- info )
[ null-info ]
- [ unclip-slice [ value-info-union ] reduce ] if-empty ;
+ [ [ ] [ value-info-union ] map-reduce ] if-empty ;
: literals<= ( info1 info2 -- ? )
{
[ drop object eq? not ] assoc-filter
[ [ t ] ] [
[ swap specializer-predicate append ] { } assoc>map
- unclip [ swap [ f ] \ if 3array append [ ] like ] reduce
+ [ ] [ swap [ f ] \ if 3array append [ ] like ] map-reduce
] if-empty ;
: specializer-cases ( quot word -- default alist )
[
builtins get sift [ (flatten-class) ] each
] [
- unclip [ assoc-intersect ] reduce [ swap set ] assoc-each
+ [ ] [ assoc-intersect ] map-reduce [ swap set ] assoc-each
] if-empty ;
M: anonymous-complement (flatten-class)