master: Return one value from (list* (values 1 2))
stassats via Sbcl-commits <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.cvs |
|---|---|
| Message-ID | <[email protected]> |
The branch "master" has been updated in SBCL:
via 1d77ce646e4c8439bc3e914912ad21af5693d0f4 (commit)
from 57c047b5d5e3f8a0543b6cd30cb80bd56c495618 (commit)
- Log -----------------------------------------------------------------
commit 1d77ce646e4c8439bc3e914912ad21af5693d0f4
Author: Stas Boukarev <[email protected]>
Date: Fri Apr 10 22:00:15 2026 +0300
Return one value from (list* (values 1 2))
Hiding only for 18 years.
---
src/compiler/fndb.lisp | 2 +-
src/compiler/srctran.lisp | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp
index 25e01ad51..e2d2e036e 100644
--- a/src/compiler/fndb.lisp
+++ b/src/compiler/fndb.lisp
@@ -1602,7 +1602,7 @@
(defknown make-broadcast-stream (&rest stream) broadcast-stream (unsafely-flushable))
(defknown make-concatenated-stream (&rest stream) concatenated-stream (unsafely-flushable))
(defknown make-two-way-stream (stream stream) two-way-stream (unsafely-flushable))
-(defknown make-echo-stream (stream stream) echo-stream (flushable))
+(defknown make-echo-stream (stream stream) echo-stream (unsafely-flushable))
(defknown make-string-input-stream (string &optional index sequence-end)
sb-impl::string-input-stream
(flushable))
diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp
index 65b966915..988a113e1 100644
--- a/src/compiler/srctran.lisp
+++ b/src/compiler/srctran.lisp
@@ -135,7 +135,9 @@
(define-source-transform list (&rest args)
(if args (values nil t) (values nil nil)))
(define-source-transform list* (arg &rest others)
- (if others (values nil t) (values arg nil)))
+ (if others
+ (values nil t)
+ `(prog1 ,arg)))
;;; Use LIST* in lieu of CONS so that there are only 2 low-level allocators
;;; instead of 3. Strictly speaking, LIST is redundant as well.
(define-source-transform cons (x y) `(list* ,x ,y))
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL