On Wed, Apr 30, 2014 at 11:18:18AM +0200, Richard Biener wrote:
> On Wed, Apr 30, 2014 at 11:04 AM, Laurynas Biveinis
> <laurynas.bivei...@gmail.com> wrote:
> >> ISTR we went to typed allocs as part of a transition which not
> >> fully materialised?
> >
> > Yes. I had plans to replace the call-based GC marker routines with a
> > generic routine that operates on a type marker stored next to the
> > object. That enables partial, generational, etc GC.
> 
> Ah, ok.  It would also naturally allow finalization.

 Yeah, one thing that occured to me is we could just use a vtable for
 the identifier, and get virtual functions on some types "for free".  We
 could also use the vtable to make inheritance and dispatch simpler
 removing the manual type mangling, but I think we could get most of the
 same benefit just with function overloads.

> >>  I actually dislike that we get back the
> >> ugly casts here - so, can we keep the allocators or use
> >> a macro similar to the XNEW family?
> >
> > My 2c suggestion would be to keep the typed allocators at least until
> > a new plan for GC is developed.
> 
> The current patches keep them in some way.  But the use of
> C++ (and its more complex types) made types more difficult
> to access.  I suppose integrating gengtype with the C++ frontend
> would be the only reasonable way out here (eh, and maybe that
> then naturally develops to C++11 garbage collection support - who
> knows).

Or we could go in the direction of supporting compile time type
introspection in C++, which I think has been asked for by other people.
However even using C++ as it is today we should be able to make gengtype
a good bit simpler if we use c++ more in the code it outputs.

thanks!

Trev

> 
> Thanks,
> Richard.
> 
> > --
> > Laurynas

Attachment: signature.asc
Description: Digital signature

Reply via email to