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: NullPointerException on android when calling load


On 11/17/2014 09:31 PM, Per Bothner wrote:


On 11/17/2014 09:01 PM, Ben Simon wrote:
On Mon, Nov 17, 2014 at 2:13 PM, Per Bothner <per@bothner.com> wrote:
Just be aware that we can't create bytecode on-the-fly in Android, so
load (or eval) has to use the Kawa interpreter, which doesn't have the
same or full functionality (compare to the compiler), and which gets less
testing.

Are the limitations outlined somewhere, or is it more trial-and-error?

No, I don't have a list.  You won't be able to do define-class or
define-simple-class.  Resolution of overloaded methods may be subtly different.
You can't do invoke-special.  I'm sure there are others.

I notice there is a project call dexmaker which seems like it could be used to
generate Android dex bytecode at runtime, which can then be loaded:

https://code.google.com/p/dexmaker/

This would be a major project, but it should be possible to use that instead of
the interpreter.

It's not clear if dexmake would really be needed.  However, it might be
helpful to study its code to see what to do.

It's not a project I plan to tackle anytime soon (unless someone pays me to do it).
It could be a good project for an ambitious volunteer who want to learn
how JVM and Dalvik bytecode work.
--
	--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]