(SIGNED-BYTE 1) = (INTEGER -1 0)
... detected by random input from pfdietz, noted on #lisp
2003-09-10
(sb!xc:deftype signed-byte (&optional s)
(cond ((eq s '*) 'integer)
- ((and (integerp s) (> s 1))
+ ((and (integerp s) (> s 0))
(let ((bound (ash 1 (1- s))))
`(integer ,(- bound) ,(1- bound))))
(t
(fun (compile nil src))
(result (1+ (funcall (eval #'*) x real-zero))))
(assert (eql result (funcall fun x)))))))
+
+;;; (SIGNED-BYTE 1) [ returned from the logxor derive-type optimizer ]
+;;; wasn't recognized as a good type specifier.
+(let ((fun (lambda (x y)
+ (declare (type (integer -1 0) x y) (optimize speed))
+ (logxor x y))))
+ (assert (= (funcall fun 0 0) 0))
+ (assert (= (funcall fun 0 -1) -1))
+ (assert (= (funcall fun -1 -1) 0)))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.3.47"
+"0.8.3.48"