]> gitweb.factorcode.org Git - factor.git/commitdiff
Revert "regexp.compiler: slightly faster with t/f check."
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 19 May 2014 17:04:16 +0000 (10:04 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 19 May 2014 17:04:16 +0000 (10:04 -0700)
This reverts commit 9dcaa5c7e690bc38e468f355cbbafd3c5b299f90.

basis/regexp/compiler/compiler.factor

index 645e3dd841b78af66b0788a913915ce0e68679eb..a8b3c9168b1dec6e4381ae9fe1038d9ee2342532 100644 (file)
@@ -118,13 +118,15 @@ C: <box> box
 
 : states>words ( dfa -- words dfa )
     dup transitions>> keys [ gensym ] H{ } map>assoc
-    [ transitions-at ] [ values ] bi swap ;
+    [ transitions-at ]
+    [ values ]
+    bi swap ; 
 
 : dfa>main-word ( dfa -- word )
     states>words [ states>code ] keep start-state>> ;
 
 : word-template ( quot -- quot' )
-    '[ drop [ f ] 2dip over _ [ 2drop ] if ] ;
+    '[ drop [ f ] 2dip over array-capacity? _ [ 2drop ] if ] ;
 
 PRIVATE>