The attached patch reclaims 5 bits in the IdentifierInfo structure by
collapsing the 5-bit field for the Objective-C '@' keywords into the
10-bit field for builtin identifiers.
The motivation for this change is simple: I need 6 bits in IdentifierInfo
to represent the names of all of the overloaded operators in C++
(operator+, operator, operator new, etc.), but we only had 5 bits free.
This patch makes room for a compact representation of overloaded operator
names.
The downside to this patch is that it makes
IdentifierInfo::getObjCKeywordId and IdentifierInfo::getBuiltinID slightly
slower--they each have a branch now--but these functions aren't called all
that often (and are typically only called when we're already doing
something expensive), I doubt it matters.
Any comments, or shall I just go ahead?
- Doug
identifier-info-bits.patch (3.28 KB)