On Fri, Jul 27, 2012 at 4:07 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank" class="cremed">alexfh@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><div class="im">On Fri, Jul 27, 2012 at 11:40 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank" class="cremed">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
FWIW, at a high level I find the callback approach is very worrisome.<div><br></div><div>The callback system was designed to be fast when the callbacks were completely null, and impose a non-trivial cost on the preprocessor otherwise.</div>
</blockquote></div><div>I do not think that we'll get measurably worse performance as a result of this change. This code only works on macro definitions (does anyone know how many of those per translation unit should we expect IRL?),</div>
</div></div></blockquote><div><br></div><div>Boost provides libraries that do terrifying things here. I don't think we can count on this number being "small".</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_extra"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Can we not walk back through the macro definitions after-the-fact? I would expect the preprocessor to still have all the information we need.</div>
</blockquote></div><div>I'm not sure that we retain contents of #undef'ed and redefined macros. And we definitely need this as we run analysis after the whole file is lexed.</div></div></div></blockquote><div><br>
</div><div>But I would expect the macros we're particularly interested in (compatibility ones) would not be undef'ed anywhere...</div></div></div>