]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/compiler/cfg/stacks/local/local.factor
use reject instead of [ ... not ] filter.
[factor.git] / basis / compiler / cfg / stacks / local / local.factor
index f8d9c7ec5b31eb6d43e5c546885837aebd22bbb3..f26bf76654b998527f368bdc1854c87502b41224 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors arrays assocs combinators compiler.cfg
 compiler.cfg.instructions compiler.cfg.parallel-copy
 compiler.cfg.registers compiler.cfg.stacks.height
-hash-sets kernel make math math.order namespaces sequences sets ;
+fry hash-sets kernel make math math.order namespaces sequences sets ;
 FROM: namespaces => set ;
 IN: compiler.cfg.stacks.local
 
@@ -24,7 +24,7 @@ IN: compiler.cfg.stacks.local
 
 : height-state>insns ( state -- insns )
     [ second ] map { ds-loc rs-loc } [ new swap >>n ] 2map
-    [ n>> 0 = not ] filter [ ##inc new swap >>loc ] map ;
+    [ n>> 0 = ] reject [ ##inc new swap >>loc ] map ;
 
 : translate-local-loc ( loc state -- loc' )
     [ clone ] dip over >loc< 0 1 ? rot nth first - >>n ;
@@ -59,7 +59,7 @@ SYMBOLS: local-peek-set replaces ;
 : changes>insns ( replaces height-state -- insns )
     [ replaces>copy-insns ] [ height-state>insns ] bi* append ;
 
-: emit-changes ( replaces height-state -- )
+: emit-changes ( replaces state -- )
     building get pop -rot changes>insns % , ;
 
 : peek-loc ( loc -- vreg )
@@ -70,7 +70,7 @@ SYMBOLS: local-peek-set replaces ;
     height-state get translate-local-loc replaces get set-at ;
 
 : compute-local-kill-set ( basic-block -- set )
-    [ rs-heights get at ] [ ds-heights get at ] bi
+    [ ds-heights get at ] [ rs-heights get at ] bi
     height-state get local-kill-set ;
 
 : begin-local-analysis ( basic-block -- )