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: patch to bring java vtables closer to g++ abi conformance


On Wed, Jan 23, 2002 at 05:35:40PM -0800, Per Bothner wrote:
> Bryce McKinlay wrote:
> 
> >Given:
> >
> >class A {}
> >class B extends A {}
> >
> >Then B would have a vtable which looks something like:
> 
> How about:
> 
> [-6] &Object.class
> [-5] &A.class
> [-4] &B.class
> [-3] -2 /* depth, negated */
> [-2] offset_to_top (always 0)
> [-1] type_info
> <-- vtable pointer points here
> [0] GC descriptor<-- vtable pointer points here
> [1] &java.lang.Object.hashCode()
> [2] ...etc
> >
> >"b instanceof A" then becomes something like

As far as this goes, do whatever you want - but put the symbol name for
the vtable where it would be if this were a C++ class.  Generally, two
words before the vtable pointer points.  Being careful of
integer/pointer sizes on various architectures, of course.

After that, I don't care :)

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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