master: Muffle compiler notes correctly when compile-evaluating.
apache--- via Sbcl-commits <[email protected]> Mon, 18 May 2026 21:54:23 +0000
| Newsgroups | gmane.lisp.steel-bank.cvs |
|---|---|
| Message-ID | <[email protected]> |
The branch "master" has been updated in SBCL:
via 5b647a0f634241ccb96b5aca635e28103581b5bc (commit)
from 259cd408e6cb2f51d3f1c5ca8a5ad5788fa1afec (commit)
- Log -----------------------------------------------------------------
commit 5b647a0f634241ccb96b5aca635e28103581b5bc
Author: Charles Zhang <[email protected]>
Date: Mon May 18 17:25:40 2026 +0200
Muffle compiler notes correctly when compile-evaluating.
Limit the scope of the handler to just the compilation portion of the
form, not for execution which may include another compilation.
---
src/code/eval.lisp | 8 ++------
src/compiler/target-main.lisp | 10 +++++++++-
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/code/eval.lisp b/src/code/eval.lisp
index 51eb7692a..50794578f 100644
--- a/src/code/eval.lisp
+++ b/src/code/eval.lisp
@@ -18,12 +18,8 @@
(let ((sb-c::*source-form-context-alist*
(acons expr *eval-source-context*
sb-c::*source-form-context-alist*)))
- (handler-bind (;; Compiler notes just clutter up the REPL:
- ;; anyone caring about performance should not
- ;; be using EVAL.
- (compiler-note #'muffle-warning))
- (sb-c:eval-with-compile-in-lexenv expr lexenv *eval-source-info*
- *eval-tlf-index* nil))))
+ (sb-c:eval-with-compile-in-lexenv expr lexenv *eval-source-info*
+ *eval-tlf-index* nil)))
;;; Handle PROGN and implicit PROGN.
#-sb-fasteval
diff --git a/src/compiler/target-main.lisp b/src/compiler/target-main.lisp
index 1bda5af33..fcbf1b30e 100644
--- a/src/compiler/target-main.lisp
+++ b/src/compiler/target-main.lisp
@@ -81,7 +81,15 @@
(*last-message-count* (list* 0 nil nil)))
(handler-bind ((compiler-error #'compiler-error-handler)
(style-warning #'compiler-style-warning-handler)
- (warning #'compiler-warning-handler))
+ (warning #'compiler-warning-handler)
+ (compiler-note
+ ;; Compiler notes just clutter up the
+ ;; REPL: anyone caring about
+ ;; performance should not be using
+ ;; EVAL.
+ (lambda (c)
+ (when for-eval
+ (muffle-warning c)))))
(with-source-paths
(let* ((tlf (or tlf 0))
;; If we have a source-info from LOAD, we will
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL