This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 0/6] Convert gimple to a C++ class hierarchy
- From: Diego Novillo <dnovillo at google dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, Jakub Jelinek <jakub at redhat dot com>, David Malcolm <dmalcolm at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 Aug 2013 11:28:34 -0400
- Subject: Re: [PATCH 0/6] Convert gimple to a C++ class hierarchy
- Authentication-results: sourceware.org; auth=none
- References: <1377793216-22549-1-git-send-email-dmalcolm at redhat dot com> <alpine dot LNX dot 2 dot 00 dot 1308301532490 dot 9949 at wotan dot suse dot de> <CAAiZkiB-Z7GfDGNuWys+d6JW+ynbtfC_Yc5YHfN9M-to5uABXg at mail dot gmail dot com> <20130830140253 dot GO21876 at tucnak dot zalov dot cz> <CAAiZkiB=iJ7dwFEe7OKhMBXccMsu6950fE6Cy=h-a6JF0h=FTA at mail dot gmail dot com> <alpine dot LNX dot 2 dot 00 dot 1308301712450 dot 9949 at wotan dot suse dot de>
On Fri, Aug 30, 2013 at 11:21 AM, Michael Matz <email@example.com> wrote:
> On Fri, 30 Aug 2013, Gabriel Dos Reis wrote:
> > On Fri, Aug 30, 2013 at 9:02 AM, Jakub Jelinek <firstname.lastname@example.org> wrote:
> > >> I thought the principle that was acquired was that gengtype shouldn't
> > >> be improved to support more than what it does now….
> > >
> > > If it means that we'll need to write and maintain tons of hand written code
> > > that could otherwise be generated and maintained by a tool for us, that
> > > principle doesn't look very good.
> > Back in March 2013, I asked about gengtype support for inheritance.
> > http://gcc.gnu.org/ml/gcc/2013-03/msg00273.html
> > This
> > http://gcc.gnu.org/ml/gcc/2013-03/msg00295.html
> > was the definitive answer that appeared to be the consensus.
> Well, it was a wrong decision then. For some smaller types writing manual
> marker might be a sensible thing, or for some extra complicated
> constructs. But here we're talking about the most simple struct hierarchy
> imaginable. Having to write manual markers for that one is absurd IMO.
I want to discourage extending gengtype more than necessary. Long
term, I would like to see memory pools replacing GC. However, that is
likely a long road so we should find an interim solution.
I vaguely remember thinking about what would be needed to have
gengtype deal with inheritance. It needed some pretty ugly
annotations. This made gengtype even more magic. That's very bad for
One thing I liked is a suggestion that went something along the lines
of creating some base templates that could be used to facilitate
writing the manual markers.
Perhaps we could minimally extend gengtype to generate those. But I
think we can take advantage of C++ template features to facilitate