mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-18 23:32:17 -08:00
cmp: constants: get rid of an edge case where we return a list
This commit is contained in:
parent
5427ba657b
commit
ba3afa81f3
2 changed files with 4 additions and 7 deletions
|
|
@ -19,9 +19,9 @@
|
|||
(defun make-single-constant-optimizer (name c-value)
|
||||
(cond ((symbolp name)
|
||||
(let* ((value (symbol-value name))
|
||||
(type (lisp-type->rep-type (type-of value))))
|
||||
(cons value `(ffi:c-inline () () ,type ,c-value
|
||||
:one-liner t :side-effects nil))))
|
||||
(type (lisp-type->rep-type (type-of value)))
|
||||
(location (make-vv :location c-value :value value :rep-type type)))
|
||||
(cons value (make-c1form* 'LOCATION :type type :args location))))
|
||||
((floatp name)
|
||||
(let* ((value name)
|
||||
(type (type-of value))
|
||||
|
|
|
|||
|
|
@ -128,10 +128,7 @@
|
|||
((ext:when-let ((x (assoc val *optimizable-constants*)))
|
||||
(pushnew "#include <float.h>" *clines-string-list*)
|
||||
(pushnew "#include <complex.h>" *clines-string-list*)
|
||||
(setf x (cdr x))
|
||||
(if (listp x)
|
||||
(c1expr x)
|
||||
x)))
|
||||
(cdr x)))
|
||||
((eq val nil) (c1nil))
|
||||
((eq val t) (c1t))
|
||||
((ext:fixnump val)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue