On Sat, 4/29/17, Richard Gaskin via use-livecode 
<use-livecode@lists.runrev.com> wrote:
>
> [snip]
> 
> I had thought one of the reasons Android uses the Dalvik and ART
> VMs is because they're VMs, separating the APIs from processor architectures.
> 
> If so, then the LC engine for Android is bytecode rather than machine 
> code, and as such should run on either processor architecture, no?
> 

Hi Richard et al,

Actually, LiveCode was not rewritten in Java, nor compiled to Dalvik/ART 
bytecode.
The engine for Android is largely written in the same C++ as for the other 
platforms.
And then compiled to native ARM instructions for the specific Android variant 
of Linux.

Most Android apps are written in Java, and occasionally tap into native code 
via the Android Native Development Kit (NDK).
Android NDK is the platform-specific implementation of the Java Native 
Interface (JNI).
Android has multiple Application Binary Interfaces (ABIs) to support various 
architectures.

ARM Android apps that don't need access to native code can run 'as is' on x86 
Android devices.
Those that do need native code, will have to compile separate builds (and may 
bundle them into a single 'fat' APK).
Or they have to rely on the ARM-on-x86 emulation feature named Houdini.

So LiveCode is a bit of an outsider, as the apps it produces spend little time 
in the Dalvik/ART virtual machine.
All scripts run in the native portion, and events are funneled from the VM into 
native code to be handled there.

All this to say: if we want native x86 Android apps, then the LiveCode team 
will have to crank up the compilers again...

Jan Schenkel.

=====
Quartam Reports & PDF Library for LiveCode
www.quartam.com
=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La 
Rochefoucauld)

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to