]> gitweb.factorcode.org Git - factor.git/commitdiff
generic.math: rename and add comment.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 7 Sep 2013 01:21:38 +0000 (18:21 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 7 Sep 2013 01:21:38 +0000 (18:21 -0700)
core/generic/math/math.factor

index 20654983242d9180033fc6d1fe281903c32459ce..5c074cea219367624fd29ce51df2a1059dea0e11 100644 (file)
@@ -97,9 +97,11 @@ SYMBOL: generic-word
     [ [ { ratio complex } ] dip make-math-method-table tuple-dispatch ] 2bi
     tuple swap 2array prefix tag-dispatch ; inline
 
-: fixnum-dispatch ( word quot -- word quot' )
+: fixnum-optimization ( word quot -- word quot' )
     [ dup fixnum bootstrap-word dup math-method ]
     [
+        ! remove redundant fixnum check since we know
+        ! both can't be fixnums in this branch
         dup length 3 - cut unclip
         [ length 2 - ] [ nth ] bi prefix append
     ] bi*
@@ -121,7 +123,7 @@ M: math-combination perform-combination
                 drop object-method
             ] if
         ] with math-dispatch-step
-        fixnum-dispatch
+        fixnum-optimization
         define
     ] with-variable ;