Skip to content
Snippets Groups Projects
Commit 66df1300 authored by ram's avatar ram
Browse files

Changed NOTE-FAILED-OPTIMIZATION to reflect the new format of

*FAILED-OPTIMIZATIONS*.
parent b73c9685
No related branches found
No related tags found
No related merge requests found
...@@ -22,27 +22,27 @@ ...@@ -22,27 +22,27 @@
;;; table. If the node has been deleted or is no longer a known call, then do ;;; table. If the node has been deleted or is no longer a known call, then do
;;; nothing; some other optimization must have gotten to it. ;;; nothing; some other optimization must have gotten to it.
;;; ;;;
(proclaim '(function note-failed-optimization (combination (or list ctype)) (defun note-failed-optimization (node failures)
void)) (declare (type combination node) (list failures))
(defun note-failed-optimization (node what)
(unless (or (node-deleted node) (unless (or (node-deleted node)
(not (function-info-p (combination-kind node)))) (not (function-info-p (combination-kind node))))
(let ((*compiler-error-context* node)) (let ((*compiler-error-context* node))
(cond ((listp what) (dolist (failure failures)
(compiler-note "Unable to optimize because:~%~6T~?" (let ((what (cdr failure)))
(first what) (rest what))) (if (consp what)
(t (compiler-note "Unable to optimize because:~%~6T~?"
(collect ((messages)) (first what) (rest what))
(flet ((frob (string &rest stuff) (collect ((messages))
(messages string) (flet ((frob (string &rest stuff)
(messages stuff))) (messages string)
(valid-function-use node what (messages stuff)))
:warning-function #'frob (valid-function-use node what
:error-function #'frob)) :warning-function #'frob
:error-function #'frob))
(compiler-note "Unable to optimize due to type uncertainty:~@
~{~6T~?~^~&~}" (compiler-note "Unable to optimize due to type uncertainty:~@
(messages)))))))) ~{~6T~?~^~&~}"
(messages)))))))))
;;; Check-Free-Function -- Interface ;;; Check-Free-Function -- Interface
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment