Trying to merge java.lang.Float, java.lang.Double with Classpath -- help wanted
Bryce McKinlay
bryce@mckinlay.net.nz
Sun Sep 21 23:52:00 GMT 2003
On Monday, Sep 22, 2003, at 10:23 Pacific/Auckland, Mark Wielaard wrote:
> This new design is a clear demonstration how to use the GNU Classpath
> VM
> interface which demonstrates an effective way of giving different VMs
> the possibility to implement VM specific parts in different ways (e.g.
> JNI, CNI, Java, ...). Since the added classes are final and package
> private they should be easy be optimized away by the VM/Compiler.
Yes, and eventually GCJ will be able to do this. However it still comes
at a cost of extra space for all the extra methods and classes
(significant if someone wants to construct a very minimal, J2ME-type
runtime), and adds maintenance burden by making the code more layered &
complex. I think the VMxxx design is a good one for many situations -
but not here. Classpath would be better off providing a default
java/JNI implementation of Float/Double and allow VM developers to
implement optimized versions themselves if desired. I suspect most VMs
will not want/need to do this though - is there anything thats actually
VM-specific about Float/Double?
Regards
Bryce.
More information about the Java-patches
mailing list