]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg: Fix unit tests
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 22 Jul 2009 03:25:19 +0000 (22:25 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 22 Jul 2009 03:25:19 +0000 (22:25 -0500)
basis/compiler/cfg/dominance/dominance-tests.factor
basis/compiler/cfg/phi-elimination/phi-elimination-tests.factor
basis/compiler/cfg/value-numbering/value-numbering-tests.factor

index b87f668d886b4a63fec88e8130a3bcab76baf228..210d5614c26608233acade0bad5130448b3ff92a 100644 (file)
@@ -36,8 +36,8 @@ V{ } 5 test-bb
 
 [ { 4 } ] [ 1 get dom-frontier [ number>> ] map ] unit-test
 [ { 4 } ] [ 2 get dom-frontier [ number>> ] map ] unit-test
-[ f ] [ 0 get dom-frontier ] unit-test
-[ f ] [ 4 get dom-frontier ] unit-test
+[ { } ] [ 0 get dom-frontier ] unit-test
+[ { } ] [ 4 get dom-frontier ] unit-test
 
 ! Example from the paper
 V{ } 0 test-bb
index 79d1797720f0e5872ccdf21290f53781d5c5c256..22afc0b32b193cfd8ab2e2af2e06aa1bbd3bbb9e 100644 (file)
@@ -36,27 +36,20 @@ V{
 
 test-diamond
 
-[ ] [ cfg new 0 get >>entry eliminate-phis drop ] unit-test
-
-[let | n! [ f ] |
+3 vreg-counter set-global
 
-[ ] [ 2 get successors>> first instructions>> first dst>> n>> n! ] unit-test
+[ ] [ cfg new 0 get >>entry eliminate-phis drop ] unit-test
 
-[ t ] [
-    T{ ##copy f V int-regs n V int-regs 1 }
-    2 get successors>> first instructions>> first =
+[ T{ ##copy f V int-regs 4 V int-regs 1 } ] [
+    2 get successors>> first instructions>> first
 ] unit-test
 
-[ t ] [
-    T{ ##copy f V int-regs n V int-regs 2 }
-    3 get successors>> first instructions>> first =
+[ T{ ##copy f V int-regs 4 V int-regs 2 } ] [
+    3 get successors>> first instructions>> first
 ] unit-test
 
-[ t ] [
-    T{ ##copy f V int-regs 3 V int-regs n }
-    4 get instructions>> first =
+[ T{ ##copy f V int-regs 3 V int-regs 4 } ] [
+    4 get instructions>> first
 ] unit-test
 
-]
-
 [ 3 ] [ 4 get instructions>> length ] unit-test
index 62ed4a7eb3cd7bdb7f4549091ef2f2f7eebb3be4..bd2bb692b7a689358518c7dc4694fe96a17515b3 100644 (file)
@@ -1218,17 +1218,6 @@ test-diamond
 
 [ t ] [ 1 get successors>> first 3 get eq? ] unit-test
 
-[let | n! [ f ] |
-
-[ ] [ 2 get successors>> first instructions>> first src>> n>> n! ] unit-test
-
-[ t ] [
-    T{ ##copy f V int-regs n V int-regs 2 }
-    3 get successors>> first instructions>> first =
-] unit-test
-
-]
-
 [ 3 ] [ 4 get instructions>> length ] unit-test
 
 V{