Re: Emacs on the metal
Frode Vatvedt Fjeld <[email protected]> Thu, 16 Jun 2005 11:01:04 +0200
| Newsgroups | gmane.lisp.movitz.devel |
|---|---|
| Message-ID | <[email protected]> |
Shawn Betts <[email protected]> writes: > I found a weird bug, too. I can't seem to create a trivial function to > reproduce it though. basically, I have: > > (defun foo () > (let (a) > (labels ((do1 () > ;; do stuff and then > (when <stuff> > (setf a <a struct>))) > (do2 () > ;; recursively call do2, do stuff, and then call.. > (do1))) > (do2) > a))) > > and (foo) returns NIL instead of <a struct>. I'll keep looking into > it for now.. I think I've nailed this bug, too. The problem was actually that function arguments were being re-ordered (in terms of execution order) by the compiler, and your code had a case where argument 2 was a local function-call that modified the lexical variable that was argument 4, and when 4 was evaluated before 2 then the side-effect of 2 wasn't visible. There was code in the compiler to avoid this problem, but it was incorrect. But now hopefully it's good. -- Frode Vatvedt Fjeld