This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,c++] use VECs in name-lookup.c:is_associated_namespace
On Mon, Aug 09, 2010 at 12:00:15PM +0100, Mark Mitchell wrote:
> Nathan Froyd wrote:
> > + VEC(tree,gc) *seen = make_tree_vector ();
> > + VEC(tree,gc) *todo = make_tree_vector ();
>
> Do these have to be "gc"? I don't think there are any GC points within
> this function, right? OK, modulo that issue.
There are no GC points. Points in favor of using gc allocation:
- vec_member can't take VEC(tree,heap) *. So we have to inline it or
write vec_heap_member or somesuch. (We could make vec_member take
VEC(tree,base) * or whatever the syntax is, but exposing VEC_BASE
etc. outside of vec.h seems ugly.)
- We potentially get to reuse vectors via make_tree_vector.
Happy to use heap allocation in the interest of getting things out of
GC.
-Nathan