Type inference for LOGAND

This commit is contained in:
Juan Jose Garcia Ripoll 2012-01-01 19:32:50 +01:00
parent cc83b4c01f
commit fc0fb82757

View file

@ -70,3 +70,14 @@
(abs shift))
nil t)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; 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)))