bugGuile - Bugs: bug #34300, Misplaced tail call optimization...

 
 

bug #34300: Misplaced tail call optimization [2.0.2+]

Submitter:  Ludovic Courtès <civodul>
Submitted:  Thu 15 Sep 2011 09:17:38 PM UTC
 
Category:  None Severity:  4 - Important
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Thu 15 Sep 2011 09:17:38 PM UTC, original submission:  

Consider this example:

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

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.

Ludovic Courtès <civodul>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wingo (Updated the item)
  • -email is unavailable- added by civodul (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-10-20 wingo StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top


    Powered by Savane 3.9