This is the mail archive of the kawa@sourceware.cygnus.com 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]

Re: Path for void constants


"Daniel Bonniot" <bonniot@cma.ensmp.fr> writes:

> First, there is a bug in QuoteExp : if value is null (like for
> QuoteExp.nullExp), getType fails. It should return pointer_type. Here's the
> patch:

I'll check this in.

> Second, method Compilation.compileConstant (Object value, Target target)
> emits a warning when 'value' is Values.empty and 'target' is a StackTarget
> with a void type.

I suspect that is is the problem:  You should not be using a StackTarget
with a void type.  Instead use IgnoreTarget.  For convenience,
you can use Target.pushValue(type) and target.returnValue(type)
to get the correct Targets.

(This is perhaps not as consistent and well-thought out as it
could be;  I notice that StackTarget.compileFromStack0 does
convert a void result to Values.empty.  Perhaps things would be
more consistent if IgnoreTarget inherited from StackTarget.  Or
maybe not.)
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

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