]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.gvn: fix tests for recent refactor.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 11 Dec 2014 22:56:58 +0000 (14:56 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 11 Dec 2014 22:56:58 +0000 (14:56 -0800)
extra/compiler/cfg/gvn/gvn-tests.factor

index 138e4bbd5dcf2b92ee911078fbc549eb8bf4a7d4..3f2bc2ce708e210b4c9973179a768317e3069064 100644 (file)
@@ -1,4 +1,4 @@
-USING: compiler.cfg.gvn compiler.cfg.instructions
+USING: combinators compiler.cfg.gvn compiler.cfg.instructions
 compiler.cfg.registers compiler.cfg.debugger
 compiler.cfg.comparisons cpu.architecture tools.test kernel
 math combinators.short-circuit accessors sequences
@@ -28,7 +28,7 @@ IN: compiler.cfg.gvn.tests
 : value-number-bb ( insns -- insns' )
     0 test-bb
     0 get block>cfg
-    value-numbering drop
+    value-numbering
     0 get instructions>> ;
 
 ! Folding constants together
@@ -2616,7 +2616,7 @@ cell 8 = [
     V{ } 2 test-bb
     0 { 1 2 } edges
     0 get block>cfg
-    value-numbering drop
+    value-numbering
     0 get [ instructions>> ] [ successors>> first number>> 1 - ] bi ;
 
 [
@@ -2799,10 +2799,12 @@ V{
 test-diamond
 
 [ ] [
-    0 get block>cfg dup cfg set
-    value-numbering
-    select-representations
-    destruct-ssa drop
+    0 get block>cfg {
+        [ cfg set ]
+        [ value-numbering ]
+        [ select-representations ]
+        [ destruct-ssa ]
+    } cleave
 ] unit-test
 
 [ 1 ] [ 1 get successors>> length ] unit-test
@@ -2838,7 +2840,7 @@ V{
 
 test-diamond
 
-[ ] [ 0 get block>cfg value-numbering drop ] unit-test
+[ ] [ 0 get block>cfg value-numbering ] unit-test
 
 [ t ] [ 1 get successors>> first 3 get eq? ] unit-test
 
@@ -2904,7 +2906,7 @@ V{
 
 [ ] [
     0 get block>cfg
-    value-numbering eliminate-dead-code
+    dup value-numbering eliminate-dead-code
 ] unit-test
 
 [ f ] [ 1 get instructions>> [ ##peek? ] any? ] unit-test
@@ -3178,7 +3180,7 @@ V{
 
 test-diamond
 
-[ ] [ 0 get block>cfg value-numbering drop ] unit-test
+[ ] [ 0 get block>cfg value-numbering ] unit-test
 
 ! First ##load-integer cannot be turned into a ##copy because
 ! the canonical leader for the value 100 is unavailable, but
@@ -3238,7 +3240,7 @@ V{ T{ ##epilogue } T{ ##return } } 5 test-bb
 3 2 edge
 4 5 edge
 
-[ ] [ 0 get block>cfg value-numbering eliminate-dead-code ] unit-test
+[ ] [ 0 get block>cfg dup value-numbering eliminate-dead-code ] unit-test
 
 [ 1 ] [ 1 get instructions>> [ ##load-integer? ] count ] unit-test
 [ 1 ] [ 2 get instructions>> [ ##phi? ] count ] unit-test