mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 06:12:25 -08:00
Type inference for LOGAND
This commit is contained in:
parent
cc83b4c01f
commit
fc0fb82757
1 changed files with 11 additions and 0 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue