[fpc-devel] FPC-JVM: Status report on Android

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Aug 30 10:34:57 CEST 2011


On 30 Aug 2011, at 10:16, Sven Barth wrote:

> Am 30.08.2011 10:10, schrieb Jonas Maebe:
>>
>> Maybe you have to explicitly add "-g-" to the OPT string when  
>> compiling
>> the RTL (and your programs), since the default config file shipped  
>> with
>> the snapshot enables debug information.
>
> I have done that already, because I'm calling ppcjvm with "-n"  
> option. Or does the compiler look in its own directory first before  
> it uses the user config file?

No, -n prevents loading any default configuration files.

> The problem seems to be something else and I'll find it sooner or  
> later...

There's a byte code verifier for dex files at http://dedexer.sourceforge.net/ 
  (search for "-r"), maybe it can give a clearer diagnostic.

Also, at http://www.netmite.com/android/mydroid/dalvik/docs/verifier.html 
  I noticed one forbidden thing that FPC currently does: "The Dalvik  
verifier is more restrictive than other VMs in one area: type safety  
on sub-32-bit integer widths. These additional restrictions should  
make it impossible to, say, pass a value outside the range [-128, 127]  
to a function that takes a byte as an argument."

FPC won't sign extend byte values when passing them to functions (the  
JVM itself only supports signed types). I'll fix that. It shouldn't  
affect the code you are getting an error about though, since that is  
about boolean vs int.


Jonas



More information about the fpc-devel mailing list