X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-numbers.lisp;h=c10c22e730ad4fd370ed315a492fc97d4d8bb60c;hb=212ef8043aeaceaa627f2924e04554fbc37b8ee1;hp=dd106818555b588dea25ebe53610125dc7a42454;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/target-numbers.lisp b/src/code/target-numbers.lisp index dd10681..c10c22e 100644 --- a/src/code/target-numbers.lisp +++ b/src/code/target-numbers.lisp @@ -10,9 +10,6 @@ ;;;; files for more information. (in-package "SB!KERNEL") - -(file-comment - "$Header$") ;;;; the NUMBER-DISPATCH macro @@ -48,17 +45,16 @@ (frob var type)) (frob var type))))))) -;;; Our guess for the preferred order to do type tests in (cheaper and/or more -;;; probable first.) -;;; FIXME: not an EQL thing, should not be DEFCONSTANT -(defconstant type-test-ordering +;;; our guess for the preferred order in which to do type tests +;;; (cheaper and/or more probable first.) +(defparameter *type-test-ordering* '(fixnum single-float double-float integer #!+long-float long-float bignum complex ratio)) -;;; Return true if Type1 should be tested before Type2. +;;; Should TYPE1 be tested before TYPE2? (defun type-test-order (type1 type2) - (let ((o1 (position type1 type-test-ordering)) - (o2 (position type2 type-test-ordering))) + (let ((o1 (position type1 *type-test-ordering*)) + (o2 (position type2 *type-test-ordering*))) (cond ((not o1) nil) ((not o2) t) (t @@ -342,8 +338,8 @@ (defun / (number &rest more-numbers) #!+sb-doc - "Divides the first arg by each of the following arguments, in turn. - With one arg, returns reciprocal." + "Divide the first argument by each of the following arguments, in turn. + With one argument, return reciprocal." (if more-numbers (do ((nlist more-numbers (cdr nlist)) (result number))