[fpc-devel] Updated FPC JVM snapshot
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Mon Nov 7 17:31:56 CET 2011
On Mon, 7 Nov 2011, Jonas Maebe wrote:
>
> On 07 Nov 2011, at 13:46, michael.vancanneyt at wisa.be wrote:
>
>> On Mon, 7 Nov 2011, Jonas Maebe wrote:
>>
>>> Yes (once THandle is added to the JVM RTL and it is defined to Pointer or
>>> JLObject, at least :). It's generally a PrintStream:
>>> http://download.oracle.com/javase/1,5.0/docs/api/java/lang/System.html#out
>>
>> Do you have a preference for either of them ?
>
> No, it doesn't matter. Pointer is probably more in line with the rest of the
> source code. As far as the compiler is concerned, they're the same thing.
I had hoped for this :-)
>
>>> There is however some functionality (e.g. writestr with ansistring) that
>>> uses the UserData byte array to store a pointer, which won't work on the
>>> JVM target. Some extra classes will also have to be moved from the jdk15
>>> unit to the system unit to implement the functionality.
>>
>> That brings me to my second question/remark: (which I had already prepared
>> before sending my first mail ;) ):
>>
>> It would be easier if the system unit could depend on jdk15 in the
>> implementation section.
>>
>> However, this is something that FPC never has been able to do, while Delphi
>> can. It would be good if FPC could do the same, it would make some system
>> units easier to manage. (in casu: the Java one)
>
> Well, in that case we could just get rid of the jdk15 unit altogether and put
> everything directly in the system unit. The main reason I didn't do that is
> because it makes loading the system unit slower due to the tons of
> definitions (otoh, most "real" programs will probably use the jdk15 unit one
> way or another anyway). It's true that the downside is that occasionally
> definitions have to be moved from the jdk15 unit to the system unit.
>From a maintenance point of view, I think it is better if they stay in a
separate unit.
As long as the system unit cannot handle separate units we can maybe make
a jdk15sys.inc, and include this in jdk15.pp and in the implementation
section of system.
Michael.
More information about the fpc-devel
mailing list