[C++ PATCH] Stage 2: Implement access check for template instantiation (2/n)
Giovanni Bajo
rasky@develer.com
Mon May 16 18:32:00 GMT 2005
Paolo Bonzini <paolo.bonzini@lu.unisi.ch> wrote:
> > The first operand of ACCESS corresponds to TREE_PURPOSE,
> > and the second operand of ACCESS corresponds to TREE_VALUE
> > of TREE_LIST respectively. Several ACCESS nodes can be
> > linked in a linked list via TREE_CHAIN.
>
> Can you please consider accessing the field via a separate ACCESS_CHAIN
> macro (it is fine to #define it to TREE_CHAIN, it is only for clarity)?
Better, I don't see a real reason for introducing yet another use of
TREE_CHAIN in GCC. The list of deferred access checks could be stored as a
Vec of ACCESS trees.
And now that I think of it, we could probably avoid having the new ACCESS
tree code at all, and just define a struct AccessCheck containing a couple
of tree pointers. Unless I am missing something.
I think it is a general consensus (at least in the C++ FE) that we should
stop using trees for things that we can do without (especially those we
don't survive till the middle-end).
--
Giovanni Bajo
More information about the Gcc-patches
mailing list