On Fri, Aug 17, 2012 at 06:41:37AM -0500, Gabriel Dos Reis wrote: > I am however concerned with: > > > static void > > store_bindings (tree names, VEC(cxx_saved_binding,gc) **old_bindings) > > { > > ! static VEC(tree,heap) *bindings_need_stored = NULL; > > I would be more comfortable to see the cache be on per-scope > (e.g. namespace scope) basis as opposed > a blanket global cache stored in a global variable.
It is not any kind of cache. It could be in theory an automatic variable vector pointer, it is only used during that function. The reason why it is static variable instead is just to avoid constant allocation/deallocation of the vector, this way after the first call it will be already allocated (but, upon entry to store_bindings will always be empty). Jakub