CNI vs interfaces

Tom Tromey tromey@cygnus.com
Wed Aug 16 15:16:00 GMT 2000


Bryce> I'm thinking an __attribute__ (also suggested by Glenn
Bryce> Chambers) would work nicely. The C++ compiler already
Bryce> recognises a "com_interface" attribute, so a "java_interface"
Bryce> would be keeping consistent with that.

If the C++ front end guys go for it, then it is cool with me.

A simple first cut would be a patch to g++ to recognize this form, and
then generate a complaint if such a method call is attempted.

Changing gcjh to generate the __attribute__ ought to be trivial.

Bryce> Is the vtable lookup emitted by C++ for a java.lang.Object
Bryce> method call going to work if the compiler sees multiple
Bryce> inheritance (I have no idea how MI dispatch works)?

I don't think so.  We would need some kind of special case there.
Until g++ changes are done it still makes sense not to have
gcjh-generated classes mention the interfaces they implement.

Tom


More information about the Java mailing list