This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Trying to merge java.lang.Float, java.lang.Double with Classpath -- help wanted
- From: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- To: Mark Wielaard <mark at klomp dot org>
- Cc: Nathanael Nerode <neroden at twcny dot rr dot com>,java-patches at gcc dot gnu dot org
- Date: Mon, 22 Sep 2003 11:50:52 +1200
- Subject: Re: Trying to merge java.lang.Float, java.lang.Double with Classpath -- help wanted
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.