bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #31445] Incorrect multiple-value truncation [1.9.13]


From: Ludovic Courtès
Subject: [bug #31445] Incorrect multiple-value truncation [1.9.13]
Date: Mon, 25 Oct 2010 09:57:34 +0000
User-agent: Mozilla/5.0 (GNU; rv:1.9.1.7) Gecko/20100107 IceCat/3.6 (like Firefox/3.6)

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]