From 0fcb485d80dbe9d4f8c41f20acc841ecbe34eb05 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 6 Sep 2013 18:21:38 -0700 Subject: [PATCH] generic.math: rename and add comment. --- core/generic/math/math.factor | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/generic/math/math.factor b/core/generic/math/math.factor index 2065498324..5c074cea21 100644 --- a/core/generic/math/math.factor +++ b/core/generic/math/math.factor @@ -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 ;