[fpc-pascal] Working Free Pascal android JNI example
Michael Van Canneyt
michael at freepascal.org
Tue Dec 7 15:45:30 CET 2010
On Tue, 7 Dec 2010, Sven Barth wrote:
> Am 07.12.2010 12:12, schrieb Matt Emson:
>> On 07/12/2010 10:46, Felipe Monteiro de Carvalho wrote:
>>> Still not ideal, however.
>> Well, no. As Android targets any processor - not just ARM. Indeed, there
>> are Intel based versions. Native is bad, and only come in to existence
>> to compete with other platforms with purely native compilation - and
>> then purely to counteract criticisms on the performance of games and
>> multimedia apps. Davlik was created for a reason - compile once, run on
>> multiple targets. Would it not be a better solution to create a Dalvik
>> back-end? As I understand it, Dalvik is very, far from a traditional
>> stack based Java VM and closer to a traditional register based processor
>> in design. I know little about it, but the benefits of Android, as a
>> platform, are completely lost when one focuses on native compilation.
> I don't see it that problematic to create a Dalvik code generator (or a
> normal Java or CIL one). The biggest problem is to create a suitable RTL and
> to be able to use the classes that are provided by the VM.
In fact I think this is one of the more easy things.
The main problem seems to me that you need to support things like pointers,
which is something deeply embedded in Pascal.
More information about the fpc-pascal