Re: [RFA] Type cleanups

Andrew Cagney
2002-05-13T04:31:48Z

> Does this mean that ``struct type *'' is becoming opaque? Looking at
>> the next patch, no, sigh.
>
>
> No. It's accessed so frequently that switching from macros to accessor
> functions would be a ridiculous performance hit, I think.

The last time this came up, the consensus was that a macro should be
converted to a function, even when it resulted in a performance loss
(things were a bit vague on how much). The debate was about STREQ which
is in the critical path for symbol table reading and the like.

Anyway, I tend to look at it more pragmatically. Is my (your, and other
developers) time best spent chasing after people that forget to or
wrongly use the accessor macro, or, on fixing real problems. Given that
I'm struggling to show a performance gain from a frame based register
cache, and no one has noticed me adding another assertion to every
gdbarch accessor function, I don't expect changing the above to opaque
to be a significant problem :-)

enjoy,
Andrew