classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gij as JRE 5


From: Andrew Haley
Subject: Re: gij as JRE 5
Date: Mon, 15 Nov 2004 14:09:00 +0000

Robert Schuster writes:
 > 
 > >There is actually a good reason. If the 1.5 classes are missing, the
 > >chances that a 1.5 compiled class will run are slim. This is what Andrew
 > >John Hughes was trying to address with his proposal to implement the 1.5
 > >classes as much as possible (using 1.4 sources). I haven't thought about
 > >it deeply, but on the surface that seems like it could be a good idea.
 > >
 > >  
 > >
 > Actually I have doubts at this point. Javac 1.5/5 compiles all its 
 > "-target 1.5" stuff with the help of java.lang.StringBuilder
 > instead of java.lang.StringBuffer. This little difference makes all code 
 > that would normally run in a 1.4 environment unusable.
 > The funny thing is that StringBuilder (and attached interfaces 
 > Appendable, CharSequence) make no use of 1.5 features.
 > 
 > So this is my vote for adding support for 1.5 bytecode addition as well 
 > as 'source 1.5'-independent (helper) classes.

Sounds good: it looks to me like we can do StringBuilder trivially by
removing all the instances of "synchronized" from StringBuffer.  We
already have methods like ensureCapacity_unsynchronized in the
implementation.

The question does arise, however, about when we should start to
generate calls to StringBuilder in gcj.  Do we have to wait for the
rest of 1.5?  This is a hard one: no problem if we're generating
bytecode for the locally installed gij, but otherwise...

It's not such a problem for native gcj, because we don't yet have
binary compatibility across releases.

Andrew.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]