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: [RFC] First steps towards segregating types.


On Fri, 21 Nov 2014, Andrew MacLeod wrote:

> The biggest issue is what to do with fields which can be either a type or a
> tree...  ie   TREE_VALUE() of a TREE_LIST can be a type, as can  a TREE_VEC
> element or a DECL_CONTEXT.  I think the DECL_INITIAL field is overloaded and
> can sometimes be a type, and this was recently introduced to
> TARGET_STATIC_CHAIN.  I suspect the compilation process will identify others.
> 
> Looking primarily at TREE_LIST first (which can  be a mixed list of trees and
> types),  the question is how to generally handle this situation

TREE_LIST should die (with the typical replacement being vec<something>); 
most lists do not need all the overhead of individually allocated objects 
with (code, flags, type, chain, value, purpose).  Probably TREE_VEC too.

That doesn't answer your question - making lists and vectors no longer 
have the static type "tree" ought to be essentially independent cleanups 
from making types no longer have the static type "tree", rather than being 
dependencies of that.  But it's a goal to keep in mind when there's a 
choice of what to do about a particular TREE_LIST or TREE_VEC case.

-- 
Joseph S. Myers
joseph@codesourcery.com


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