]> gitweb.factorcode.org Git - factor.git/commitdiff
Use [ ] [ ] map-reduce instead of unclip [ ] reduce
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 6 Apr 2009 22:50:54 +0000 (17:50 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 6 Apr 2009 22:50:54 +0000 (17:50 -0500)
basis/compiler/cfg/linear-scan/allocation/allocation.factor
basis/compiler/tree/propagation/info/info.factor
basis/hints/hints.factor
core/classes/builtin/builtin.factor

index 8d00a14ea2142c69463605ef53404dae56607f19..908bf2475b980e154ffdf445699ccf3466f64e32 100644 (file)
@@ -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.
index c56db570b21735c1c0574d45ccec102ec1ccd00c..a22b7aa1727f70f801c062b5a16279fffac94a17 100644 (file)
@@ -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 -- ? )
     {
index 6fece31d88845baf6f7d75407405ce2c18e8e6a4..2534e0121f984e8ae1aaa9e629fdc2502cb944f1 100644 (file)
@@ -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 )
index 0e4a3b56fde4218ae824fa275becf8547b513e39..f95d66fd05c02731d556752b4df57611cd72d3bb 100644 (file)
@@ -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)