This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: generic type support


Tom Tromey writes:
 > >> Come generics, GCJ would only need to support it at a bytecode level.
 > 
 > Andrew> I on't know about that.  I would have thought that there are
 > Andrew> tremendous opportunities for optimization with the added type
 > Andrew> information.
 > 
 > I read a paper about java generics last year.  Their approach requires
 > the insertion of checkcast calls, even though they are known to always
 > succeed.  We could omit these checks from the object code.

Exactly.  With generics, we have no need to do any such runtime
checking when generating native code from source.  At present,
whenever we use any collection class we do these runtime checks, and
it is very expensive.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]