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


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

Re: Java name-mangling


>>>>> "Per" == Per Bothner <per@bothner.com> writes:

    Per> One of us is misunderstanding, I think.  What do you think

Me, I think.

    Per> needs recoding?

I think I misunderstood the interfaces point.  I thought that Java
(via CNI) actually wanted to be able to implement a Java class
implementing an interface as a C++ class derived from a virtual base.
If that were so, then the Java front-end would have to expect the
layout of the C++ object to match its own layout of the same class if
it were written entire in Java.  If, however, you're not going to
actually implement Java classes implementing interfaces by coding them
as C++ classes deriving from virtual bases, then this matters not at
all.

As long as the only compatibility has to be with C++ classes using
single non-virtual inheritance, there shouldn't be any unduly severe
problems.  Vptrs in the class are now located in a different place,
and the contents of the vtable are slightly different: the RTTI and
offset-to-top fields are at negative offsets from the point where the
vptr points.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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