This is the mail archive of the 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: darwin specific

Dale Johannesen wrote:

This uses the TREE_TYPE and TREE_CHAIN field of some IDENTIFIER nodes,
are currently idle.  Per Bothner is working on IDENTIFIERs and knows about
this new usage.
What I'm working on is replacing all or most of the language-specific
"properties" stored a single shared field.  An enum (stolen from
cpp_hashnode) indicates which "property" is the value of the field.
If an identifier has more than one non-NULL property, then the field
instead points to an extension tree_vec.

The idea is that most identifiers have no language-specific properties,
and for the rest most of them only have a single property.  So we can
save a lot of space in each identifier.

A refinement of this idea is to use the normally unused TREE_TYPE or
TREE_CHAIN fields of the identifier, saving more space.  This of
course would conflict with Dale's patch.  One possible solution to
that is allow "target-specific properties"; Dale's patch could be
fairly easily modified to work that way.  Mainly it's a matter of
modifying macros like DARWIN_ID_TO_NON_LAZY_PTR, though we'd also
need to add lvalue versions, like SET_DARWIN_ID_TO_NON_LAZY_PTR.

I did a trial implemntation (without the target properties), but
I decided (from a trial run) that for C++ it probably makes more
sense to use a separate field for IDENTIFIER_NAMESPACE_BINDINGS.
This is free if we use TREE_CHAIN (say), while using (say)
TREE_TYPE for the selected property value.

This is taking a little longer than expected to get working, partly
due to multi-tasking.  Not really knowing much about the C++
front-end isn't helping, of course.
	--Per Bothner

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