]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.tree.propagation.transforms: tweak 2^ transform to fix performance regressio...
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 15 Feb 2010 12:03:09 +0000 (01:03 +1300)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 15 Feb 2010 12:03:09 +0000 (01:03 +1300)
basis/compiler/tree/propagation/transforms/transforms.factor

index da3bd58f74da06478f1cfb24cadd54c8828b7ea7..0077d0f1231b90af01b9da143d701d4b4e0a6841 100644 (file)
@@ -103,13 +103,10 @@ IN: compiler.tree.propagation.transforms
 
 ! Speeds up 2^
 : 2^? ( #call -- ? )
-    in-d>> first2 [ value-info ] bi@
-    [ { [ literal>> 1 = ] [ class>> fixnum class<= ] } 1&& ]
-    [ class>> fixnum class<= ]
-    bi* and ;
+    in-d>> first value-info literal>> 1 eq? ;
 
 \ shift [
-     2^? [
+    2^? [
         cell-bits tag-bits get - 1 -
         '[
             >fixnum dup 0 < [ 2drop 0 ] [