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:
Daniel Kochmański 2023-06-06 13:03:20 +02:00
parent d62cf434c6
commit e9f05ac85e
3 changed files with 6 additions and 10 deletions

View file

@ -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)))))

View file

@ -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)))

View file

@ -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))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;