Use [ ] [ ] map-reduce instead of unclip [ ] reduce
parent
2ef6043566
commit
37e278ed02
|
@ -99,7 +99,7 @@ SYMBOL: spill-counts
|
|||
: 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.
|
||||
|
|
|
@ -238,7 +238,7 @@ DEFER: (value-info-union)
|
|||
|
||||
: 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 -- ? )
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ M: object specializer-declaration class ;
|
|||
[ 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 )
|
||||
|
|
|
@ -55,7 +55,7 @@ M: anonymous-intersection (flatten-class)
|
|||
[
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue