compilation error when apply macro in the same module

Per Bothner per@bothner.com
Sat Feb 16 16:48:00 GMT 2008


Yaroslav Kavenchuk wrote:
> The problem is solved if I move macros in a separate module.
> 
> But this is bug?

Probably, but you don't give me a complete test-case to try - just
the macro definition, not the macro use.

When the macro is in a separate module, it is compiled to bytecode.
Invoke the macro calls compiled code.

When the macro is in the same module, it hasn't yet been compiled
to bytecode, so it has to be interpreted.  That is why you might
be getting different results - it might be a bug or incompleteness
in the Kawa interpreter.

Try applying this patch - it should at least provide a better
error message.

Also, it's a good idea if you can simplify your macro and
example to the simplest possible that still exhibits the error.
That both makes it easier for to track down, and and might
make a better addition to the Kawa test-suite so once the
problem is fixed, it stays fixed.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lookup.patch
Type: text/x-patch
Size: 878 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/kawa/attachments/20080216/e319fb17/attachment.bin>


More information about the Kawa mailing list