GNU bug report logs -
#15533
optimizing away noticeable effects
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#15533: optimizing away noticeable effects
which was filed against the guile package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 15533 <at> debbugs.gnu.org.
--
15533: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15533
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Following prompting from mark weaver on IRC. I rebased this patch, and
pushed to stable-2.0.
--
Ian Price -- shift-reset.com
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
[Message part 3 (message/rfc822, inline)]
I was peeved today to come across a bug that manifested itself when I
removed a pk from a particular value in my code.
Time to play "spot the difference"
scheme@(guile-user)> ,optimize (define (foo f arg)
(let* ((l '())
(m (if (pair? arg)
(begin
(set! l (cdr arg))
(car arg))
arg)))
(lambda () (apply f m l))))
$14 = (define (foo f arg)
(let ((m (if (pair? arg)
(begin (begin (cdr arg) (if #f #f)) (car arg))
arg)))
(lambda () (f m))))
scheme@(guile-user)> ,optimize (define (foo2 f arg)
(let* ((l '())
(m (if (pair? arg)
(begin
(set! l (cdr arg))
(car arg))
arg)))
(lambda () (apply f m (pk l)))))
$15 = (define (foo2 f arg)
(let* ((l '())
(m (if (pair? arg)
(begin (set! l (cdr arg)) (car arg))
arg)))
(lambda () (apply f m (pk l)))))
and if you actually define those procedures and run them
scheme@(guile-user)> ((foo list '(a b c)))
$16 = (a)
scheme@(guile-user)> ((foo2 list '(a b c)))
;;; ((b c))
$17 = (a b c)
I'm currently on the lua branch, which means branches from master at
6871327742d3e1a0966aa8fed04c911311c12c2a (Aug 31). I'll try on a more
recent master or stable when I have time.
--
Ian Price -- shift-reset.com
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
This bug report was last modified 11 years and 142 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.