This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3)


On 10/31/2013 05:26 PM, David Malcolm wrote:
[Shamelessly hijacking Andrew's thread about gimple.h refactoring,
since this seems on-topic for that, and I'm keen to hear from Andrew on
how the following would interact with his work - I *think* our two
cleanups are orthogonal.

[This is a revised version of the patches sent as:
   http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01788.html
and
   http://gcc.gnu.org/ml/gcc-patches/2013-08/msg01954.html
which got bogged down in discussion of hand-written GTY hooks.  This
patch series updates things to make use of the new support in gengtype
for simple inheritance schemes]

The gimple statement types are currently implemented using a hand-coded
C inheritance scheme, with a "union gimple_statement_d" holding the
various possible structs for a statement.

The following series of patches convert it to a C++ hierarchy, using the
existing structs, eliminating the union. The "gimple" typedef changes
from being a
   (union gimple_statement_d *)
to being a:
   (struct gimple_statement_base *)


Very good idea. But please, document that in some texinfo file, probably gcc/doc/gimple.texi

Gimple-s are so damn important, even for plugin writers, that a small but up to date documentation is absolutely essential. You don"t need to write a lot of doc, just the minimal stuff (which at least tells which file should the plugin writer look into and list all the relevant classes).

I hope your patches (or similar ones) will be accepted in 4.9

Regards.



--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***


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