This is the mail archive of the kawa@sources.redhat.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]
Other format: [Raw text]

Re: syntax-case error?


Robert Nikander wrote:
> Ah okay, thanks. I'm curious, how do you plan on executing macro-expansion code in the module before the module is compiled? Will you compile parts of the module before the final class-file output, or will you interpret macro expansion code without compiling it? Both seem pretty hairy.

There are 3 options I'm considering: (1) require the programmer to explicitly write something like eval-when (as in CommonLisp or ChezScheme) around parts to be compiled separately. (2) do it automatically, when a macro is referenced. (3) extend the interpreter so we can interpret more complex expressions without compiling them.

I earlier decide to only interpret "simple" expressions, but I'm now
leaning towards "completing" the interpreter.  This seems needed for
complete defmac and syntax-case support.  So it will probably be (3),
though (1) may also be worth implementing.

Am I right that there is no way to run bytecode in the JVM without loading a class,

Yes, by definition, since there is no concept of "bytecode" that is not in a class.

and that there is no way to rewrite the bytecode of a class once it is loaded?

Well, some JVMs do implement a kind of hot-plugging, but we cannot count on that.

call/cc? That will be interesting!

Yes. I mentioned this because I recently realized it might be easier to "try out" call/cc with an interpreter than in the compiler, and interpreter support is a good idea anyway. The changes in gnu/expre around 2005-02-12 were an initial step in this direction. -- --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]