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: ObjC configured --with-objc-gc needs external Boehm gc


"Boehm, Hans" wrote:
> > From: Helge Hess [mailto:helge.hess@skyrix.com]
> > Hm, I don't remember - all-interior-ptrs are required for
> > untyped memory
> > ? The ObjC runtime uses typed allocation, so it might not require
> > all-interior-ptrs.
>
> The question is really whether the last pointer to an object can point to
> the inside of the object.  If you can get and save a pointer to a field in
> object A, save it inside object B, and then drop the pointer to A, you need
> ALL_INTERIOR_POINTERS.  Thus C/C++ more or less need it, while Java doesn't.
> If you can embed C structs inside Objective C objects, I suspect Objective C
> also needs it?

I'm sure I read somewhere (in one of your papers, perhaps) that some compiler
optimizations can hide base pointers and necessitate ALL_INTERIOR_POINTERS even
if interior objects are not explicitly accessed in code.

I believe the java frontend always maintains base pointers to live objects, not
sure about objc.

--
Jeff Sturm
jeff.sturm@commerceone.com

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