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: Kawa payload size in trivial android apps


On Feb 28, 2014, at 6:59 PM, Per Bothner <per@bothner.com> wrote:

> Ideally, the best way for two mixed-language source would be to build on
> javac. I.e. you write an extension to javac to "calls back" into the Kawa compiler.
> You'd write wrapper classes that match what javac expects, but that wrap
> the similar kawac classes.  This would be a non-trivial job, and requires
> building familiar with but javac internals and Kawa. When I worked on
> JavaFX Script I used to know my way around javac, but I'm a bit rusty now.

Does stock javac have hooks for this kind of thing already, in which case
the only thing to do is write the Kawa-specific piece that fits the API,
or would this be a new feature for javac that we would need to get pushed
into the JDK sources?

> The easier approach (used by Grovey and Scala, I believe) is to compile
> twice: Compile the Kawa to stub classes; compile the Java code; do the
> real compile of the Kawa classes.
> 
> Exactly how to compile to stub class is non-obvious.  It helps if you know
> the names of the Java classes, which is why hooking into javac is preferable.
> 
> Could be a Google Summer of Code project.

Let's add it to the list!

--
Jamison Hope
The PTR Group
www.theptrgroup.com




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