emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#9769: closed (Misplaced tail call optimization)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#9769: closed (Misplaced tail call optimization)
Date: Thu, 20 Oct 2011 21:53:02 +0000

Your message dated Thu, 20 Oct 2011 23:51:20 +0200
with message-id <address@hidden>
and subject line Re: bug#9769: Misplaced tail call optimization
has caused the debbugs.gnu.org bug report #9769,
regarding Misplaced tail call optimization
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9769: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9769
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Misplaced tail call optimization Date: Sun, 16 Oct 2011 22:29:00 +0200 User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)
(This is a copy of <http://savannah.gnu.org/bugs/?34300>, so it doesn't
get lost.  :-))

Consider this example:

  (define bar
    (lambda ()
      (let ((fail (lambda () 'fail)))
        (let loop ((a (iota 3)))
          (if (pair? a)
              (loop (cdr a))
              (fail)))
        (pk 'done))))

This function should return 'done but it instead returns 'fail, because both
the call to `loop' and the call to `fail' are compiled as if they were tail
calls.

To reproduce the test, turn partial evaluation off---otherwise the call to
`fail' is inlined and the problem doesn't show up.

Ludo'.



--- End Message ---
--- Begin Message --- Subject: Re: bug#9769: Misplaced tail call optimization Date: Thu, 20 Oct 2011 23:51:20 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Fixed in git.  Thanks for the report!

commit aa9c19858872a135ea959066fff26f86527a1bd0
Author: Andy Wingo <address@hidden>
Date:   Thu Oct 20 23:50:05 2011 +0200

    fix misallocation of some <fix> procedures
    
    * module/language/tree-il/analyze.scm (analyze-lexicals): When stepping
      into a non-tail form, we know that labels allocation will be invalid,
      so use an empty labels set.  Fixes http://debbugs.gnu.org/9769.
    
    * test-suite/tests/tree-il.test ("labels allocation"): Add a test.

-- 
http://wingolog.org/


--- End Message ---

reply via email to

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