This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Bug with let-values?
- From: Per Bothner <per at bothner dot com>
- To: dominique dot boucher at nuecho dot com
- Cc: "'Kawa List'" <kawa at sources dot redhat dot com>
- Date: Thu, 13 Oct 2005 12:46:23 -0700
- Subject: Re: Bug with let-values?
- References: <200510071833.j97IXdZD007114@bergman.nuecho.ad>
Dominique Boucher wrote:
I think I found a bug w.r.t. let-values and the named-let form. If I enter
the following in the interpreter:
(let loop ()
(let-values (((x y z) (values 1 2 3)))
(loop)))
I get [a java.lang.NullPointerException]
Actually, the bug has nothing to do with let-values. The problem is
that since 'loop' is only called, not read, then it gets compiled to
(just a) method. (There is no actual object for loop.) Hence it get
compiled at a later time, at which point it would add entries to
initialize the fields that reference the two nested lambda expressions.
Unfortunately, by that code we had already run the code that walks
the chain of pending initializers.
Bottom line: another example of the compiler doing things in the
wrong order.
I checked in a patch (to gnu/expr/Compilation.java) into CVS.
Whether it makes it into 1.8 depends on whether I do a re-spin,
which depends on how soon the FSF gets back to me about how to
upload to ftp.gnu.org.
--
--Per Bothner
per@bothner.com http://per.bothner.com/