This is the mail archive of the gcc@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: darwin.c identifier-smashing



On 09/07/2004, at 3:20 PM, Mark Mitchell wrote:



Geoff, Mike --


There's some quadratic behavior in darwin.c that needs fixing.
However, I'm a bit puzzled about how to do that, exactly, due to:

	      /* FIXME: This breaks the identifier hash table.  */
	      IDENTIFIER_NODE_CHECK (TREE_VALUE (temp))->identifier.id.str
		= (unsigned char *) name;

What I don't understand is why this isn't just:

TREE_VALUE (temp) = get_identifier (name);

Why is it important to stomp over an existing IDENTIFIER_NODE?

The ideal reply would take the form of a patch with a comment
explaining the issue. :-)

Because there may be more than one reference to the IDENTIFIER_NODE, of course. The darwin backend is using the IDENTIFIER_NODE to store data about the thing that it names by having magic characters in the name. It's all really horrible and should be replaced by using SYMBOL_REF_FLAGS and maybe look-aside structures if necessary.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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