<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Dec 19, 2011, at 9:48 PM, Rafael Ávila de Espíndola wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">On 19/12/11 11:33 PM, Ted Kremenek wrote:<br><blockquote type="cite">Hi David,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'm sorry to come down hard here, but I really don't like the idea of<br></blockquote><blockquote type="cite">adding a fake method just unweaken the vtables.  Can we just move the<br></blockquote><blockquote type="cite">offending virtual methods out-of-line?  Having weak vtables is one<br></blockquote><blockquote type="cite">thing; have a dead method permanently embedded in that vtable is<br></blockquote><blockquote type="cite">another.  We've now just increased the size of the clang executable<br></blockquote><blockquote type="cite">(and make the code less pretty) just to perform this build-time<br></blockquote><blockquote type="cite">optimization.<br></blockquote><br>At least on ELF the impact of the patch is small, but mostly on the<br>wrong direction. I tested reverting this patch in a Release build.<br><br>When being build with clang, reverting reduces the sum of the size of<br>every .o from 73445656 bytes to 73420224 bytes and of the clang binary<br>from 30553808 to 30513696.<br><br>When building with gcc 4.6, the sum of the size of every .o goes from<br>81926520 to 82165328 (so the patch saved a bit) and the clang binary<br>goes from 36017976 to 35894528.</span></blockquote></div><br><div>Beyond the file size, my main concern is why do we need an anchor() methods at all?  Can't we just move more methods to have out-of-line definitions in .cpp files and accomplish the same thing?  I'm completely willing to admit that I'm missing some key idea, but if so can someone please point it out to me?  No offense David (as I really appreciate you spear heading this effort), but they really look like turds in the codebase to me.</div></body></html>