mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-02-15 03:41:00 -08:00
cmp: c1constant-value: remove defunct parameter ONLY-SMALL-VALUES
After inclusion of the externalizable NAN values the parameter ':ONLY-SMALL-VALUES T' is the same as ':ALWAYS NIL' (the default). That makes the the operator slightly easier to understand.
This commit is contained in:
parent
d62cf434c6
commit
e9f05ac85e
3 changed files with 6 additions and 10 deletions
|
|
@ -244,10 +244,8 @@
|
|||
(return
|
||||
(let ((results (multiple-value-list (apply fname (nreverse all-values)))))
|
||||
(if (endp (rest results))
|
||||
(c1constant-value (first results) :only-small-values nil)
|
||||
(let ((results (mapcar (lambda (r)
|
||||
(c1constant-value r :only-small-values nil))
|
||||
results)))
|
||||
(c1constant-value (first results))
|
||||
(let ((results (mapcar #'c1constant-value results)))
|
||||
(when (every #'identity results)
|
||||
(make-c1form* 'values :args results)))))))
|
||||
(error (c) (cmpdebug "Can't constant-fold ~s ~s: ~a~%" fname forms c)))))
|
||||
|
|
|
|||
|
|
@ -25,9 +25,8 @@
|
|||
((keywordp form)
|
||||
(make-c1form* 'LOCATION :type (object-type form)
|
||||
:args (add-symbol form)))
|
||||
((constantp form *cmp-env*)
|
||||
(or (c1constant-value (symbol-value form) :only-small-values t)
|
||||
(c1var form)))
|
||||
((and (constantp form *cmp-env*)
|
||||
(c1constant-value (symbol-value form))))
|
||||
(t (c1var form))))
|
||||
((consp form)
|
||||
(cmpck (not (si:proper-list-p form))
|
||||
|
|
@ -117,7 +116,7 @@
|
|||
(return form))
|
||||
(setf form new-form))))
|
||||
|
||||
(defun c1constant-value (val &key always only-small-values)
|
||||
(defun c1constant-value (val &key always)
|
||||
(cond
|
||||
;; FIXME includes in c1 pass.
|
||||
((ext:when-let ((x (assoc val *optimizable-constants*)))
|
||||
|
|
@ -146,7 +145,6 @@
|
|||
#+sse2
|
||||
((typep val 'EXT:SSE-PACK)
|
||||
(c1constant-value/sse val))
|
||||
(only-small-values nil)
|
||||
(always
|
||||
(make-c1form* 'LOCATION :type `(eql ,val)
|
||||
:args (add-object val)))
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
(si:complex-single-float . #c(0.0l0 0.0l0)))
|
||||
:test #'subtypep))))
|
||||
(if new-value
|
||||
(c1constant-value new-value :only-small-values t)
|
||||
(c1constant-value new-value)
|
||||
(c1nil))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue