X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-numbers.lisp;h=6b8f6c60fbe4298e52a7b6a6bb939db3636e0ae3;hb=b8f63d9b4e978bec3bfc1f4fc471e5ed946781fd;hp=dd106818555b588dea25ebe53610125dc7a42454;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/target-numbers.lisp b/src/code/target-numbers.lisp index dd10681..6b8f6c6 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)) @@ -1278,7 +1274,7 @@ "Returns the root of the nearest integer less than n which is a perfect square." (declare (type unsigned-byte n) (values unsigned-byte)) - ;; theoretically (> n 7), i.e., n-len-quarter > 0 + ;; Theoretically (> n 7), i.e., n-len-quarter > 0. (if (and (fixnump n) (<= n 24)) (cond ((> n 15) 4) ((> n 8) 3)