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: Making friends; Android simplified view construction with the kawa runtime (kawart.jar instead of kawa.jar)


On 07/26/2013 04:01 PM, Marius Kjeldahl wrote:
As I've mentioned before, the example on the Kawa site for "Android
simplified view" construction does NOT work out of the box when using
the "kawart" jar file (Kawa "runtime").

...

Mission accomplished. The net benefit wasn't big; after optimization
(Proguard) the apk size went from 189kb to 185kb, just under 4k.

Of course the net benefit would be higher if we could leave out those
classes you're "adding back in".

I am not sure what the real idea with the kawa runtime really is,

"Kawa runtime" is meant to be analogous to "Java runtime" - i.e. the
classes needed for "normal" compiled code, that does not use eval, the
repl, load and or in general the compilation-related classes.
I.e. most of gnu.bytecode, gnu.expr, kawa.lang, and kawa.standard
should *not* be in kawart.

The problem is the various inter-dependencies between classes and
methods makes this challenging.  Cleaning this up is a long-time goal.

One known trouble-spot is gnu.expr.Inlineable.  This is used for
custom bytecode-generation for a Procedure.  Any place where
a Procedure class in kawart implements Inlineable it's a bug.
I've gotten rid of many of the places where Procedure implements
Inlineable, but there are still a number remaining.  The basic
idea is to move Inlineable's compile method to a helper class, like
(for example) AddOp uses CompileArith.

but if
the stuff that the "android simplified view" construction is supposed to
work with the kawa runtime (kawart), I propose that this gets fixed so
that it works.

I would prefer to figure out why Android applications don't
work with kawart.  (Of course Android applications that use eval or the
repl aren't expected to work with kawart.)

At least from the point of view of shrinkage, I do not believe the 4k is
worth anything, so an alternative "fix" to make sure the android samples
always work with kawa is to state that you need to use the "full" kawa
jar file, not the kawa runtime file (kawart).

That is ok for now.
--
	--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]