Hi Paul, On Fri, 12 Aug 2011 07:56:39 -0700 Paul Colby <paulcco...@earthlink.net> wrote:
> I tried the following file as a prelude to doing conditional > compilation and ran into the following snag, > > ----------------------------- example.scm ----------------------- > (define A #t) > (define B 'undefined) > (if A > (set! B 'good) > (set! B 'bad)) > (print B) > ------------------------------ end ---------------------------------- > > running csi prints out the expected message 'good' > compiling using 'csc example.scm' and running the > executable results in 'undefined' being printed. the > code generated by 'csc -t example.scm' is given below. That piece of code used to work as expected when compiled by Chicken 4.3.0. It seems that 37c7156da6c0b23536c031f44a7734a8c6542e84 has triggered the behavior you report. The following patch brings the old behavior back, but I'm not sure it is the right fix (probably Felix can tell): index 1e30ed4..5405645 100644 --- a/optimizer.scm +++ b/optimizer.scm @@ -72,9 +72,7 @@ (set! previous (remove (lambda (p) (eq? (car p) var)) previous)))] [(if ##core#cond ##core#switch) - (scan (first subs) e) - (touch) - (scan-each (cdr subs) e)] + (scan (first subs) e) ] [(let) (scan-each (butlast subs) e) Best wishes. Mario -- http://parenteses.org/mario _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users