From: "Ludovic Courtès" <INVALID.NOREPLY@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>, bug-guile@gnu.org
Subject: [bug #31445] Incorrect multiple-value truncation [1.9.13]
Date: Mon, 25 Oct 2010 09:57:34 +0000 [thread overview]
Message-ID: <20101025-095734.sv15145.1814@savannah.gnu.org> (raw)
In-Reply-To:
URL:
<http://savannah.gnu.org/bugs/?31445>
Summary: Incorrect multiple-value truncation [1.9.13]
Project: Guile
Submitted by: civodul
Submitted on: Mon 25 Oct 2010 09:57:33 AM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This is with `map' implemented in C:
#v+
scheme@(guile-user)> (map (lambda (x) (values x x)) (iota 2))
$5 = (#<values (0 0)> #<values (1 1)>)
scheme@(guile-user)> ,x map
Disassembly of #<procedure map (_ _ . _)>:
0 (assert-nargs-ge 0 2)
3 (push-rest 0 2)
6 (object-ref 0) ;; #<pointer 0x7f4ee0395d20>
8 (subr-call 3)
#v-
Instead, the result should be '(0 1).
Conversely:
#v+
scheme@(guile-user)> (map (lambda (x) (identity (values x x))) (iota 2))
$6 = (0 1)
scheme@(guile-user)> ,x identity
Disassembly of #<procedure identity (x)>:
0 (assert-nargs-ee/locals 1)
2 (local-ref 0) ;; `x'
4 (return)
#v-
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31445>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
next reply other threads:[~2010-10-25 9:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 9:57 Ludovic Courtès [this message]
2010-11-18 19:35 ` [bug #31445] Incorrect multiple-value truncation [1.9.13] Andy Wingo
2010-11-18 21:31 ` Ludovic Courtès
2010-11-19 15:39 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101025-095734.sv15145.1814@savannah.gnu.org \
--to=invalid.noreply@gnu.org \
--cc=bug-guile@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).