[fpc-devel] Updated FPC JVM snapshot

Alexander Shishkin alexvins at mail.ru
Mon Nov 7 14:43:04 CET 2011


07.11.2011 4:39, Jonas Maebe пишет:
> Hi,
>
> I've put a new FPC JVM snapshot online (corresponding to svn r19598 of the jvmbackend branch), linked from http://wiki.freepascal.org/FPC_JVM
>
> Changes since the previous snapshot include:
> * the compiler will now implicitly convert between all Pascal string types and JLString (java.lang.String)
> * most, if not all, previously missing string helpers have been added to the system unit for all string types (insert, delete, pos, ...)
> * several fillchar overloads for use on arrays have been added to the system unit
> * generics now work
> * the compiler will now generate a constructor that takes an (automatically generated) interface for all (also automatically generated) classes that are used to implement "procedure of object" procedure variables. This allows them to be used much more easily and naturally from Java code
> * support for pchar, including typecasting an ansistring to pchar and indexing it like on native platforms (with read/write capabilities). Note that this does not work for unicodestring and pwidechar due to unicodestring mapping to java.lang.String, which is both opaque and immutable
> * exceptions raised in invocations of virtual class methods and procedure variables are now properly propagated to the caller
> * {$VARPARACOPYOUTCHECK+/-} / -Cv switch to enable checking var-parameters (and to a limited extent also out-parameters) on the JVM target for changes to the value passed as var-parameter during the function call (because they are handled via copy-in/copy-out, this may indicate unexpected bahviour later on).
>
> Note that this code has not been synchronized with FPC svn trunk recently. Even though it's version 2.7.1, it dates from before the cpstrnew merge. I'm waiting for those changes to completely settle down before updating the JVM backend branch with them.
>
>
> Jonas_______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>

Interesting.
1) {$modeswitch unicodestrings} plus cpstring = nearly full string 
compatibility with delphi.
2) Nested routines implementation for JVM is very similar to closures. I 
think it could be easily advanced to complete crossplatform closure 
implementation.

I`m wating merging to trunk )



More information about the fpc-devel mailing list