This is the mail archive of the
mailing list for the GCC project.
Re: [cxx-conversion] Support garbage-collected C++ templates
- From: Laurynas Biveinis <laurynas dot biveinis at gmail dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Lawrence Crowl <crowl at google dot com>
- Date: Thu, 9 Aug 2012 10:12:10 +0300
- Subject: Re: [cxx-conversion] Support garbage-collected C++ templates
- References: <20120808195258.GA30576@google.com>
It's all good changes and your plan for future improvements sounds
good, including the part where gengtype is killed with fire.
> - Functions should be emitted in files that have access to the
> structure where they were defined. I'm not convinced that the
> current multiplicity of gt-*.[ch] files is even necessary. However,
> I would like the guidance of a gengtype maintainer. I don't think I
> fully understand all of it.
Yes, I remember looking into splitting the output a few years ago. It
should be possible to split gtype-desc.h into header files to be
included in source header files defining the relevant types. I.e.
tree.h includes a generated gt-tree.h that provides allocator
definitions for the tree.h types. gtype-desc.h then would be left with
the master enum of all GTY-handled types. It should be also possible
to split gtype-desc.c into already-existing gt-foo.h too, although the
benefit of doing that is not as big I think.
> I've tested the patch on x86_64 with the page and zone collectors and
> with --enable-checking=gc,gcac (boy was that a slow mistake).
Might be also interesting to try valgrind. Good to hear the zone
collector hasn't bitrotten once again.
> * doc/gty.texi: Document support for C++ templates and
> user-provided markers.
The 1st node in this doc file needs s/C/C++/g and perhaps some more
explanation with an eye on C++.