Question about EH

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri Feb 25 15:51:00 GMT 2000


> The logical solution is to make sure there is a pointer from the C++
> type descriptors to the Java Class object.  An even better solution
> to *embed* the C++ typeinfo in the Java class, perhapos using
> multiple inhgeritance

I'm not sure which one would be better, but adding the pointer to the
C++ typeinfo is certainly easy:

class __java_type_info:public __si_type_info{
  ::java::lang::Class *klass;
};

I don't know how interfaces are reflected in CNI, but having a special
Java typeinfo appears to allow dynamic-casting between Java instance
pointers and Java interface pointers.

Regards,
Martin



More information about the Gcc mailing list