Fix type propagator for LOGAND

This commit is contained in:
Juan Jose Garcia Ripoll 2012-10-21 13:19:32 +02:00
parent 4b19fb3f60
commit 161a3fefb7

View file

@ -75,9 +75,11 @@
;;; TYPE PROPAGATION
;;;
(def-type-propagator logand (a b)
(let ((output (dolist (int-type '((UNSIGNED-BYTE 8) FIXNUM) 'INTEGER)
(when (or (subtypep a int-type)
(subtypep b int-type))
(return int-type)))))
(values (list a b) output)))
(def-type-propagator logand (&rest args)
(values args
(if args
(dolist (int-type '((UNSIGNED-BYTE 8) FIXNUM) 'integer)
(when (loop for value in args
always (subtypep value int-type))
(return int-type)))
'fixnum)))