master: Return one value from (eval `(lambda ()))

stassats via Sbcl-commits <[email protected]> Mon, 18 May 2026 14:58:27 +0000
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  259cd408e6cb2f51d3f1c5ca8a5ad5788fa1afec (commit)
      from  c8376074c6bf3979974cee79b989983d76047c24 (commit)

- Log -----------------------------------------------------------------
commit 259cd408e6cb2f51d3f1c5ca8a5ad5788fa1afec
Author: Stas Boukarev <[email protected]>
Date:   Mon May 18 17:46:59 2026 +0300

    Return one value from (eval `(lambda ()))
---
 src/compiler/target-main.lisp | 7 +++----
 tests/compiler-2.pure.lisp    | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/compiler/target-main.lisp b/src/compiler/target-main.lisp
index 156acd6db..1bda5af33 100644
--- a/src/compiler/target-main.lisp
+++ b/src/compiler/target-main.lisp
@@ -55,10 +55,9 @@
     ;; I sure hope that users don't expect COMPILE to necessarily return a
     ;; unique blob of code. How could they?
     (return-from %compile-in-lexenv
-      (values (if (policy *lexenv* (= safety 0))
-                  (load-time-value #'constantly-nil t)
-                  (load-time-value #'sb-impl::0-arg-nil t))
-              nil nil)))
+      (if (policy *lexenv* (= safety 0))
+          (load-time-value #'constantly-nil t)
+          (load-time-value #'sb-impl::0-arg-nil t))))
   (with-compilation-values (:just-values for-eval)
     (prog ((source-paths (when source-info *source-paths*))
            (compile-object (make-core-object ephemeral))
diff --git a/tests/compiler-2.pure.lisp b/tests/compiler-2.pure.lisp
index 6037610e0..5f4af64c4 100644
--- a/tests/compiler-2.pure.lisp
+++ b/tests/compiler-2.pure.lisp
@@ -5111,7 +5111,7 @@
                :name 'self-call))))
     (assert (member 'self-call (ctu:find-named-callees fun)))))
 
-(with-test (:name :compile-self-call-policy.1)
+(with-test (:name :compile-self-call-policy.2)
   (let ((fun (symbol-function
               (checked-compile
                `(lambda (a)

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL