]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.gvn.alien: use next-vreg on final iteration, which seems to fix a bug
authorAlex Vondrak <ajvondrak@csupomona.edu>
Wed, 6 Jul 2011 04:00:52 +0000 (21:00 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 12 Sep 2012 22:14:11 +0000 (15:14 -0700)
extra/compiler/cfg/gvn/alien/alien.factor

index 0c6d31fb2e5b84bfa676d323af9b586012530c68..5e4edfe305bdd9910baa07c36e10c1f3ea566b39 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors combinators combinators.short-circuit fry
-kernel make math sequences
+kernel make math namespaces sequences
 cpu.architecture
 compiler.cfg.hats
 compiler.cfg.utilities
@@ -46,7 +46,11 @@ M: ##box-displaced-alien rewrite
         }
         {
             ! [ dup [ ##box-displaced-alien? ] with-available-uses? ]
-            [ f ]
+            [
+                final-iteration? get [
+                    dup [ ##box-displaced-alien? ] with-available-uses?
+                ] [ f ] if
+            ]
             [ rewrite-unbox-displaced-alien ]
         }
         [ 2drop f ]