SBCL tells me it is deleting unreachable code that is almost surely reachable
Barton Willis via Maxima-discuss <[email protected]>
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <SN6PR07MB7952E3DCD974B92A718E20ECB6222@SN6PR07MB7952.namprd07.prod.outlook.com> |
Here is a revision of a function in hayat. The revision eliminates or helps to eliminate two testsuite failures.
The SBCL (2.4.7) compiler tells me that
; file: C:/Users/barton/maxima-code-pure/maxima-code/src/./hayat.lisp
; in: DEFUN COEF-SIGN
; (EQ MAXIMA::SGN 'MAXIMA::$POS)
;
; note: deleting unreachable code
I think that is rubbish—likely, I'll commit the (commented out) memq version.
(defun coef-sign (coef)
(let ((sgn ($csign coef)))
(cond ((or (eq sgn '$complex) (eq sgn '$imaginary)) '$im)
;((memq sgn '($neg '$zero '$pos)) sgn)
((or (eq sgn '$neg) (eq sgn '$zero) (eq sgn '$pos)) sgn)
(t
(let ((asgn ($asksign coef)))
;; When sgn is zero and limit is active, record this fact as a noun equality
;; in *limit-assumptions*.
(when (and *limit-assumptions* (eq asgn '$zero))
(push (ftake '$equal coef 0) *limit-assumptions*))
asgn)))))
_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss