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: CL not is not not?


On 05/24/2012 04:15 PM, Jamison Hope wrote:
OK, I figured this out.

The problem line is
boolean val = PrimType.booleanValue(value);

in Compilation#compileConstant. PrimType#booleanValue is implemented as:
return ! (value instanceof Boolean) || ((Boolean) value).booleanValue();
which (of course!) returns the wrong value when passed Lisp2.FALSE
(which is a LList, not a Boolean) in Common Lisp.

Replacing that line in Compilation.java with
boolean val = getLanguage().isTrue(value);
does the right thing:

Thanks - I checked in your patch.


P.S. It would be appreciated if you can try to include ChangeLog
entries.

Testcases are also also welcome if it's not too difficult
to write them.  For something like this using RunScriptTest might
be appropriate - see gnu/q2/testsuite for examples for Q2, and
the main testsuite for Scheme examples.  We might need to enhance
RunScriptTest for CommonLisp - I haven't tried that yet.
--
	--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]