This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug with let-values?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]