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,RFC/RFH] remove uses of build_constructor_from_list from?Ada FE


On Thu, Jun 17, 2010 at 09:25:08PM +0200, Eric Botcazou wrote:
> > I think the second one is preferable, but it's not quite as effective in
> > TREE_LIST removal as the first.  Are there other options that I've not
> > considered (highly possible), or does the second option seem like the
> > best way forward?
> 
> Maybe using a TREE_VEC.  We already use one for TYPE_RM_VALUES.

Hm, that's an idea.  That's going to uglify gnat_to_gnu_entity somewhat,
as TREE_VEC isn't growable.  You'd also need a place to stash the number
of used elements for later use--unless you want to reallocate the vector
for every copy-in-copy-out parameter.  I suppose I could use a hack like
C++'s NON_DEFAULT_TEMPLATE_ARGS_COUNT, but...ugh.

I personally think TREE_VEC should just be a wrapper around VEC,
precisely for cases like this.

-Nathan


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