[fpc-devel] New FPC JVM snapshot: Android support

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Dec 12 19:50:06 CET 2011


Hi,

A new FPC JVM snapshot has been put online at http://wiki.freepascal.org/FPC_JVM

The main new feature is full fledged support for Android/Dalvik, including a Pascal translation of the Android SDK classes. To compile for Android rather than for the Java VM, simply use the -Tandroid command line parameter. The compiler will still generate Java class files, but these can then be translated into Dalvik code by the Android SDK tools just like any javac-compiled class files.

Some other, minor, changes:
* the compiler now properly cleans up the intermediate .j files (Jasmin "Java assembler" files) when not using -a
* the JVM compiler and RTL (both for Java and Android) can now be built using the top-level FPC Makefile
* fixed modifying certain kinds of var/out parameters from inside nested routines
* fixed a bug triggered by some kind of nested try/except statements
* -Ctcompactintarrayinit command line option to create more compact code for initializing typed array constants. The reason is that the JVM class file format does not support array constants, so such initializations have to be encoded as explicit code sequences in the class init code. This class init code is however limited to 64KB of bytecode, and this can be exceeded in case you have many or large initialized arrays. This parameters uses alternate code that is potentially slower, but much more compact than the default
* fixed a bug in copy(unicodestring,x,y) when x<>0


Jonas

PS: I've put the Android RTL source files in rtl/android/jvm, so that there will be no conflicts when adding support for Android/ARM later.


More information about the fpc-devel mailing list