diff --git a/src/cmp/cmpopt-bits.lsp b/src/cmp/cmpopt-bits.lsp index 991bc005b..e97bdde2c 100644 --- a/src/cmp/cmpopt-bits.lsp +++ b/src/cmp/cmpopt-bits.lsp @@ -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)))