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] Convert gimple to a C++ class hierarchy


On Fri, Aug 30, 2013 at 11:21 AM, Michael Matz <matz@suse.de> wrote:
>
> Hi,
>
> On Fri, 30 Aug 2013, Gabriel Dos Reis wrote:
>
> > On Fri, Aug 30, 2013 at 9:02 AM, Jakub Jelinek <jakub@redhat.com> 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.
>
> Exactly.
>
> > 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
maintenance.

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
this.


Diego.


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