This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Kawa payload size in trivial android apps
- From: Jamison Hope <jrh at theptrgroup dot com>
- To: "kawa at sourceware dot org list" <kawa at sourceware dot org>
- Date: Sun, 2 Mar 2014 10:33:00 -0500
- Subject: Re: Kawa payload size in trivial android apps
- Authentication-results: sourceware.org; auth=none
- References: <CAHdMyCKyw8FCUi7cmsmN2hGO=9Nk=o3jyTBL+mZs=Y2-H04uow at mail dot gmail dot com> <531122D5 dot 7000205 at bothner dot com>
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