]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.gvn.testing: separate out test-gvn to skip graphviz output for each...
authorAlex Vondrak <ajvondrak@csupomona.edu>
Mon, 27 Jun 2011 22:16:42 +0000 (15:16 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 12 Sep 2012 22:14:09 +0000 (15:14 -0700)
extra/compiler/cfg/gvn/testing/testing.factor

index 51fd05cacc6d66c91b2a1dbda0ec0f3c36d860cd..6ff3857e5212418a42b5dc9a2b2c75e6edae9b3e 100644 (file)
@@ -86,16 +86,10 @@ SYMBOL: iteration
         name>> "value-numbering" =
     ] split-when [ value-numbering ] join ;
 
+: test-gvn ( path quot -- )
+    gvn-passes passes [
+        0 iteration [ watch-optimizer* ] with-variable
+    ] with-variable ;
+
 : watch-gvn ( path quot -- )
-    annotate-gvn [
-        gvn-passes passes [
-            0 iteration [ watch-optimizer* ] with-variable
-        ] with-variable
-    ] [ reset-gvn ] [ ] cleanup ;
-
-USING: io.pathnames math math.private ;
-
-: test-gvn ( path -- )
-    "resource:work" prepend-path
-    [ 0 100 [ 1 fixnum+fast ] times ]
-    watch-gvn ;
+    annotate-gvn [ test-gvn ] [ reset-gvn ] [ ] cleanup ;