mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-04-22 09:40:38 -07:00
type= thinks all subtypes of complex are the same. this breaks down the optimizer for coerce.
This commit is contained in:
parent
8abfb0da7d
commit
ec23122149
1 changed files with 8 additions and 4 deletions
|
|
@ -198,10 +198,6 @@
|
|||
(base-char . (character x))
|
||||
(character . (character x))
|
||||
(function . (si::coerce-to-function x))
|
||||
(complex .
|
||||
(let ((y x))
|
||||
(declare (:read-only y))
|
||||
(complex (realpart y) (imagpart y))))
|
||||
))
|
||||
|
||||
(defun expand-coerce (form value type env)
|
||||
|
|
@ -237,6 +233,14 @@
|
|||
when (eq type a-type)
|
||||
do (return (subst value 'x template))))
|
||||
;;
|
||||
;; FIXME! COMPLEX cannot be in +coercion-table+ because
|
||||
;; (type= '(complex) '(complex double-float)) == T
|
||||
;;
|
||||
((eq type 'COMPLEX)
|
||||
`(let ((y ,value))
|
||||
(declare (:read-only y))
|
||||
(complex (realpart y) (imagpart y))))
|
||||
;;
|
||||
;; Complex types defined with DEFTYPE.
|
||||
((and (atom type)
|
||||
(get-sysprop type 'SI::DEFTYPE-DEFINITION)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue