This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCJ: Java generics ala Sun JDK1.5
- From: Tom Tromey <tromey at redhat dot com>
- To: David Jung <jungdl at ornl dot gov>
- Cc: gcc at gcc dot gnu dot org
- Date: 23 Jan 2002 16:51:41 -0700
- Subject: Re: GCJ: Java generics ala Sun JDK1.5
- References: <3C4F3CDB.9020802@ornl.gov>
- Reply-to: tromey at redhat dot com
>>>>> "David" == David Jung <jungdl@ornl.gov> writes:
David> According to Sun's site on their prototype javac with support for
David> generics, they were planning to make generics part of the Java language
David> spec. as of 1.4, but have delayed it until 1.5.
David> Is anyone working on adding generics to gcj?
As far as I'm aware, nobody is working on this.
David> If not, is it a priority to add it, or will you hang back until
David> after 1.5 has been released by Sun?
Is it definitely going to be in 1.5? I don't track Sun's cutting edge
too closely. Last time I read about generics, there was still some
debate as to whether they would ever go in.
If Sun adds them to the language, then, yes, it will be important for
gcj to support them. We aim to have a compatible environment.
However, the time scale for such work is indeterminate. Serious gcj
front end hacking time seems scarce.
My understanding is that the Sun generics are a Java-level change,
that don't require any changes at the JVM level. If that is still the
case, then in the meanwhile you can use Sun's `javac' to compile to
bytecode, and then compile the bytecode with gcj. This won't give you
as good performance, but it ought to work.
David> C# / .NET:
David> * Has a bytecode that is more ameanable to translation to
David> register based machines (hence performance is better)
We recommend people compile from .java files, not from .class files.
That avoids some of the inefficiency -- though to be fair I think the
problems are more with our compiler than with the design of the JVM
itself. Still, I'm willing to be convinced. Do you have a specific
example of how the C# bytecode design is better?
Tom