generic type support

Andrew Haley
Wed Feb 19 21:16:00 GMT 2003

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.


More information about the Java mailing list