This is the mail archive of the java-discuss@sources.redhat.com 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]

RE: V3 ABI


If I understand this correctly, I think there's another issue with the GC,
though this one's very minor.  Presumably interpreter generated vtables will
be allocated as collectable objects, and referenced only by an interior
pointer at a known offset from the start of the object?

Since the collector is normally confgured to not recognize interior
pointers, it needs to be told at initialization time (via
GC_register_displacement) that pointers to that offset within an object
should be considered valid.  Otherwise interpreter vtables may disappear.

This will make the collector's pointer recognition very slightly more
conservative, but I doubt this will ever be measurable.

Hans

> -----Original Message-----
> From: Bryce McKinlay [mailto:bryce@albatross.co.nz]
> Sent: Thursday, December 07, 2000 6:17 PM
> To: Per Bothner
> Cc: apbianco@cygnus.com; java-discuss@sourceware.cygnus.com
> Subject: Re: V3 ABI
> 
> 
> Per Bothner wrote:
> 
> > Alexandre Petit-Bianco <apbianco@cygnus.com> writes:
> >
> > > I was under the impression that the definition for 
> Object.java for gcj
> > > wouldn't change. gcj generated vtable for Object would be 
> created as
> > > usual, along with the dummy entries. So only changing
> > > java/lang/Object.h would just force the C++ compiler to do what we
> > > want. Am I missing something?
> >
> > I don't know the new C++ ABI.  I vaguely remember that rtti 
> is now at
> > negative office in the vtable.  In principle, jc1 should 
> generate the
> > same entries at negative office.  However, if they are only 
> needed for
> > rtti, it may not matter that much, at least until we have integrated
> > Java and C++ rtti mechanisms better.
> 
> Right, the "typeinfo pointer" field is at a -1 offset (from the vtable
> address). However, I figured that this would be where the java class
> pointer would go? Then again, if we want that to actually make  proper
> C++ RTTI type_info objects, then I guess dummy entries will need to be
> added for both the jclass pointer and the GC descriptor? That 
> should mean
> we don't need to change the runtime at all! (except for Object.h).
> 
> regards
> 
>   [ bryce ]
> 
> 

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