nashorn on android? (impossible? improbable? :))

Remi Forax forax at univ-mlv.fr
Wed Jan 23 04:22:13 PST 2013


On 01/23/2013 12:32 PM, Jim Laskey (Oracle) wrote:
> On 2013-01-22, at 7:15 PM, Darren Cruse <darren.cruse at gmail.com> wrote:
>
>> Hope this question isn't annoying (because the more I'd researched the more
>> I think this is a real challenge).
>>
>> But I'm excited at the idea of "javascript everywhere" and it would be
>> really nice if "everywhere" wound up including nashorn on android.
>>
>>>  From googling around my suspicion is that invokedynamic is probably slow if
>> ever coming to the Dalvik VM - am I seeing it right?
>>
>> Or is there some solution coming for this?
>>
>> e.g. I thought I'd seen something about a JSR for emulating invokedynamic
>> on older JVMs but I can't find it - and now wonder if I dreamed it :).
>>
>> Also I just stumbled on this:  http://code.google.com/p/droid292/
>>
>> But it looks more like a proposal than a going concern at this point.
>>
>> Any thoughts?
>>
>> What are the odds of nashorn ever coming to android?
> We are only supporting on the JVM.  Another group would have to take on Dalvik.
>

Hi Darren,
porting Nashorn on Android is a big project because Android doesn't 
implement the JSR 292,
droid292 was a prototype done by some of my students for there master 
thesis (in computer engineering)
to evaluate how difficult it is.

Since last september, Jerome Pilliet has started his Phd thesis on 
porting the JSR 292 on Android,
the main issue is that you can not directly port or re-implement what 
Hotspot (the Oracle VM) does because
the battery of your smartphone will not last more than one hour in that 
case :)

The first set of patches have hit the Android repository not long ago 
and you can find a most recent version here:
https://bitbucket.org/jpilliet/android-292
https://bitbucket.org/jpilliet/dalvik-292
https://bitbucket.org/jpilliet/libcore-292

Anyway, don't expect Nashorn to work on Android before at least one year.

Rémi






More information about the nashorn-dev mailing list